Submission #104319

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1043192019-04-05 05:42:44ihdigniteCoin Collecting (JOI19_ho_t4)C++14
0 / 100
3 ms512 KiB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mxN=1e5;
int n, c[mxN][2];
ll a1;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for(int i=0, x, y; i<2*n; ++i) {
cin >> x >> y;
if(x<1) {
a1+=1-x;
x=1;
}
if(x>n) {
a1+=x-n;
x=n;
}
if(y<1) {
a1+=1-y;
y=1;
}
if(y>2) {
a1+=y-2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

joi2019_ho_t4.cpp: In function 'int main()':
joi2019_ho_t4.cpp:43:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    if(i1<=i2||j<n-1&&c[j+1][1]) {
               ~~~~~^~~~~~~~~~~
joi2019_ho_t4.cpp:52:20: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    if(i2<=i1||j<n-1&&c[j+1][0]) {
               ~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...