답안 #72215

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
72215 2018-08-26T06:04:31 Z ----------넘사벽----------(#2265, gs18113, jaeyong0201) 재채점 전쟁 (FXCUP3_judge) C++17
10 / 100
141 ms 11184 KB
#include<bits/stdc++.h>
#define N 500005

using namespace std;

int Count[2000000];
char dat[N][22];
char input[22];
bool output[N];

int main(){
	int x, d, c;
	int i, j;
	int tmp;
	scanf("%d", &x);
	scanf("%d", &d);
	for(i=0;i<d;i++){
		scanf("%s", dat[i]);
	}
	scanf("%d", &c);
	int sub;
	for(i=0;i<c;i++){
		scanf("%s", input);
		tmp=0;
		for(j=0;j<20;j++){
			tmp*=2;
			if(input[j]=='x') tmp++;
		}
		for(sub=tmp;sub;sub=(sub-1)&tmp){
			Count[sub]++;
		}
	}
	for(i=0;i<d;i++){
		tmp=0;
		for(j=0;j<20;j++){
			tmp*=2;
			if(dat[i][j]=='o') tmp++;
		}
		int cnt=0;
		for(sub=tmp;sub;sub=(sub-1)&tmp){
			if(__builtin_popcount(sub)%2) cnt+=Count[sub];
			else cnt-=Count[sub];
		}
		output[cnt]=1;
	}
	for(i=1;i<=c;i++){
		printf("%c", output[i] ? 'o':'x');
	}
	printf("\n");
	return 0;
}

Compilation message

judge.cpp: In function 'int main()':
judge.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &x);
  ~~~~~^~~~~~~~~~
judge.cpp:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &d);
  ~~~~~^~~~~~~~~~
judge.cpp:18:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", dat[i]);
   ~~~~~^~~~~~~~~~~~~~
judge.cpp:20:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &c);
  ~~~~~^~~~~~~~~~
judge.cpp:23:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%s", input);
   ~~~~~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 3 ms 1416 KB Output is correct
4 Correct 4 ms 2204 KB Output is correct
5 Correct 4 ms 2204 KB Output is correct
6 Correct 4 ms 2440 KB Output is correct
7 Correct 3 ms 2440 KB Output is correct
8 Correct 5 ms 2892 KB Output is correct
9 Correct 5 ms 3208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 3 ms 1416 KB Output is correct
4 Correct 4 ms 2204 KB Output is correct
5 Correct 4 ms 2204 KB Output is correct
6 Correct 4 ms 2440 KB Output is correct
7 Correct 3 ms 2440 KB Output is correct
8 Correct 5 ms 2892 KB Output is correct
9 Correct 5 ms 3208 KB Output is correct
10 Correct 116 ms 3208 KB Output is correct
11 Incorrect 141 ms 11184 KB Output isn't correct
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 3 ms 356 KB Output is correct
3 Correct 3 ms 1416 KB Output is correct
4 Correct 4 ms 2204 KB Output is correct
5 Correct 4 ms 2204 KB Output is correct
6 Correct 4 ms 2440 KB Output is correct
7 Correct 3 ms 2440 KB Output is correct
8 Correct 5 ms 2892 KB Output is correct
9 Correct 5 ms 3208 KB Output is correct
10 Correct 116 ms 3208 KB Output is correct
11 Incorrect 141 ms 11184 KB Output isn't correct
12 Halted 0 ms 0 KB -