Submission #17326

#TimeUsernameProblemLanguageResultExecution timeMemory
17326tncks0121Weighting stones (IZhO11_stones)C++14
8 / 100
219 ms40980 KiB
#include <stdio.h> #include <stdlib.h> #include <bits/stdc++.h> using namespace std; int N; int X[100][100500]; long long L[100], R[100]; int main() { scanf("%d", &N); for(int i = 0; i < 100; i++) { X[i][0] = rand() % 10000 + 1; for(int j = 1; j < N; j++) X[i][j] = X[i][j - 1] + rand() % 10000 + 1; } while(N--) { int P, S; scanf("%d%d", &P, &S); bool a1 = false, a2 = false; for(int i = 0; i < 100; i++) { (S == 1 ? L : R)[i] += X[i][P - 1]; if(L[i] < R[i]) a1 = true; if(L[i] > R[i]) a2 = true; } if(a1 ^ a2) { puts(a1 ? "<" : ">"); }else { puts("?"); } } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...