# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
17328 | tncks0121 | 돌 무게 재기 (IZhO11_stones) | C++14 | 471 ms | 80240 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <stdio.h>
#include <stdlib.h>
#include <bits/stdc++.h>
using namespace std;
const int TRIALS = 200;
int N;
int X[TRIALS][100500];
long long L[TRIALS], R[TRIALS];
int main() {
scanf("%d", &N);
for(int i = 0; i < TRIALS; 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 < TRIALS; 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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |