답안 #17327

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
17327 2015-11-20T23:24:38 Z tncks0121 돌 무게 재기 (IZhO11_stones) C++14
0 / 100
473 ms 80240 KB
#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[100], R[100];
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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 80240 KB Output isn't correct - 1st words differ - expected: '>', found: '?'
2 Incorrect 0 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
3 Incorrect 0 ms 80240 KB Output isn't correct - 2nd words differ - expected: '<', found: '?'
4 Incorrect 0 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
5 Incorrect 0 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
6 Incorrect 4 ms 80240 KB Output isn't correct - 4th words differ - expected: '<', found: '?'
7 Incorrect 5 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
8 Incorrect 4 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
9 Incorrect 5 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
10 Incorrect 33 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
11 Incorrect 303 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
12 Incorrect 473 ms 80240 KB Output isn't correct - 4th words differ - expected: '?', found: '>'
13 Incorrect 383 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
14 Incorrect 396 ms 80240 KB Output isn't correct - 2nd words differ - expected: '<', found: '?'
15 Incorrect 374 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
16 Incorrect 364 ms 80240 KB Output isn't correct - 3rd words differ - expected: '>', found: '?'
17 Incorrect 379 ms 80240 KB Output isn't correct - 66863rd words differ - expected: '?', found: '>'
18 Incorrect 362 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
19 Incorrect 384 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
20 Incorrect 384 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
21 Incorrect 366 ms 80240 KB Output isn't correct - 52nd words differ - expected: '?', found: '>'
22 Incorrect 372 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
23 Incorrect 373 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
24 Incorrect 378 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'
25 Incorrect 379 ms 80240 KB Output isn't correct - 1st words differ - expected: '<', found: '?'