您好,欢迎访问一九零五行业门户网

Codeforces Round #283 (Div. 2) a_html/css_WEB-ITnose

/** * @brief codeforces round #283 (div. 2) a * @file a.cpp * @author mianma * @created 2014/12/18 17:45 * @edited 2014/12/18 17:45 * @type brute * @note */#include #include #include using namespace std;#define max(a, b) ((a) > (b) ? (a) : (b))#define min(a, b) ((a) > (b) ? (b) : (a)) #define abs(a) ((a) > 0 ? (a) : (0 - (a)))#define clr(vec) memset(vec, 0, sizeof(vec))#ifdef debugifstream in;ofstream out;#define cin in#define cout out#else#define cin cin#define cout cout#endif#define maxn 105#define inf 1000100int n;int table[maxn];int ans = inf;int main(void){ ios_base::sync_with_stdio(0);#ifdef debug cin.open(./in, ios::in); cout.open(./out, ios::out);#endif cin >> n; for(int i = 0; i > table[i]; } for(int i = 1; i < n - 1; i++){ int tmp = -1; for(int j = 1; j < n; j++){ if(i == j) continue; else if(i + 1 == j) tmp = max( tmp, table[j] - table[j - 2] ); else tmp = max( tmp, table[j] - table[j - 1] ); } ans = min(tmp, ans); } cout << ans << \n; return 0;}
其它类似信息

推荐信息