Submission #40565

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
405652018-02-05 01:42:35Just_Solve_The_ProblemChessboard (IZhO18_chessboard)C++11
100 / 100
1409 ms3820 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define whatis(x) cout << #x << " is -> " << x << endl;
const ll linf = (ll)1e18 + 7;
const ll N = (ll)1e5 + 7;
ll x1[N], YY[N], x2[N], y2[N];
ll n;
ll k;
ll ans = linf;
inline ll gety(ll y,ll len){
if(y <= 0) return 0;
ll res = (y / len) / 2 * len;
if((y / len) & 1) res += y % len + 1;
return res;
}
inline ll getx(ll x,ll len){
if(x <= 0) return 0;
ll res = (x / len) / 2 * len;
if((x / len) & 1) res += x % len + 1;
return res;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

chessboard.cpp:61:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main () {
       ^
chessboard.cpp: In function 'int main()':
chessboard.cpp:62:26: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
   scanf("%lld %d", &n, &k);
                          ^
chessboard.cpp:64:55: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long long int*' [-Wformat=]
     ll a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d);
                                                       ^
chessboard.cpp:64:55: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long long int*' [-Wformat=]
chessboard.cpp:64:55: warning: format '%d' expects argument of type 'int*', but argument 4 has type 'long long int*' [-Wformat=]
chessboard.cpp:64:55: warning: format '%d' expects argument of type 'int*', but argument 5 has type 'long long int*' [-Wformat=]
chessboard.cpp:62:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %d", &n, &k);
                           ^
chessboard.cpp:64:56: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     ll a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d);
                                                        ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...