# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
953141 | Pacybwoah | 양말 찾기 (KPI13_socks) | C++17 | 1 ms | 344 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<cstdio>
using namespace std;
inline char readchar(){
const int S = 1<<16;
static char buf[S], *p = buf, *q = buf;
return p == q and (q = (p = buf) + fread(buf, 1, S, stdin)) == buf ? EOF : *p++;
}
inline int R(int &a){
static char c;
while(((c = readchar()) < '0' or c > '9') and c != '-' and c != EOF);
if(c == '-'){
a = 0;
while((c = readchar()) >= '0' and c <= '9') a *= 10, a -= c ^ '0';
} else {
a = c ^ '0';
while((c = readchar()) >= '0' and c <= '9') a *= 10, a += c ^ '0';
}
}
int arr[32][2];
int main(){
int n;
R(n);
int x,i;
for(i=0;i<32;i++) arr[i][0]=0,arr[i][1]=0;
int j;
for(i=0;i<n;i++){
R(x);
x+=1000000001;
for(j=31;j>=0;j--){
if(x&(1<<j)) arr[j][1]^=x;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |