답안 #17328

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
17328 2015-11-20T23:25:22 Z tncks0121 돌 무게 재기 (IZhO11_stones) C++14
8 / 100
471 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[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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 80240 KB Output isn't correct - 5th words differ - expected: '?', found: '<'
2 Incorrect 0 ms 80240 KB Output isn't correct - 6th words differ - expected: '?', found: '>'
3 Incorrect 0 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
4 Incorrect 0 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
5 Incorrect 0 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '>'
6 Incorrect 0 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
7 Incorrect 0 ms 80240 KB Output isn't correct - 17th words differ - expected: '?', found: '<'
8 Incorrect 4 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
9 Incorrect 7 ms 80240 KB Output isn't correct - 7th words differ - expected: '?', found: '<'
10 Incorrect 41 ms 80240 KB Output isn't correct - 8th words differ - expected: '?', found: '<'
11 Incorrect 291 ms 80240 KB Output isn't correct - 4th words differ - expected: '?', found: '<'
12 Incorrect 471 ms 80240 KB Output isn't correct - 4th words differ - expected: '?', found: '>'
13 Correct 367 ms 80240 KB Output is correct - 100000 tokens
14 Correct 382 ms 80240 KB Output is correct - 100000 tokens
15 Incorrect 358 ms 80240 KB Output isn't correct - 26th words differ - expected: '?', found: '<'
16 Incorrect 362 ms 80240 KB Output isn't correct - 9th words differ - expected: '?', found: '>'
17 Incorrect 372 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
18 Incorrect 374 ms 80240 KB Output isn't correct - 4th words differ - expected: '?', found: '<'
19 Incorrect 382 ms 80240 KB Output isn't correct - 17th words differ - expected: '?', found: '>'
20 Incorrect 373 ms 80240 KB Output isn't correct - 13th words differ - expected: '?', found: '>'
21 Incorrect 362 ms 80240 KB Output isn't correct - 11th words differ - expected: '?', found: '<'
22 Incorrect 371 ms 80240 KB Output isn't correct - 11th words differ - expected: '?', found: '<'
23 Incorrect 387 ms 80240 KB Output isn't correct - 7th words differ - expected: '?', found: '<'
24 Incorrect 362 ms 80240 KB Output isn't correct - 3rd words differ - expected: '?', found: '<'
25 Incorrect 375 ms 80240 KB Output isn't correct - 9th words differ - expected: '?', found: '<'