| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 24417 | Extazy | Weighting stones (IZhO11_stones) | C++14 | 0 ms | 18408 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N = 1<<17;
const int G = 32;
struct xorshift {
unsigned x,y,z,w;
xorshift(): x(123456789), y(2387329), z(7777777), w(87389) {}
unsigned next() {
unsigned t=x^(x<<11);
x=y;y=z;z=w;
return w=w^(w>>19)^t^(t>>8);
}
unsigned next(unsigned a) {
return next()%a;
}
unsigned next(int a, int b) {
return a+next(b-a+1);
}
} rng;
int n,w[G][N];
long long s[2][G];
int main() {
int i,j,x,y,cnt0,cnt1;
scanf("%d", &n);
for(i=1;i<=30;i++) {
map < int, bool > have;
for(j=1;j<=n;j++) {
w[i][j]=rng.next(1,1000000000);
if(have.find(w[i][j])==have.end()) have[w[i][j]]=true;
else {
--j;
continue;
}
}
sort(w[i]+1,w[i]+1+n);
}
for(i=1;i<=n;i++) {
scanf("%d %d", &x, &y);
--y;
for(j=1;j<=30;j++) s[y][j]+=w[j][x];
cnt0=cnt1=0;
for(j=1;j<=30;j++) cnt0+=(s[0][j]>s[1][j]),cnt1+=(s[1][j]>s[0][j]);
if(cnt0==30) printf(">\n");
else if(cnt1==30) printf("<\n");
else printf("?\n");
}
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
