Submission #26331

# Submission time Handle Problem Language Result Execution time Memory
26331 2017-06-29T08:30:19 Z 김현수(#1102) Trapezi (COI17_trapezi) C++11
6 / 100
0 ms 2020 KB
#include<bits/stdc++.h>
using namespace std;
int n, cnt;
char a[3][4];

int main()
{
	scanf("%d",&n);
	if(n != 1) return 0;
	scanf("%s%s",a[0],a[1]);
	for(int i=0;i<2;i++) for(int j=0;j<3;j++) {
		a[i][j] = (a[i][j] == '0');
		cnt += a[i][j];
	}
	if(cnt == 6) {puts("111\n222"); return 0;}
	if(cnt != 3) {puts("nemoguce"); return 0;}
	int X = a[0][0] + a[0][1] + a[0][2], Y = a[0][0] + a[1][0], Z = a[0][2] + a[1][2];
	if(X != 3 && X != 0 && !((Y == 2 && Z == 0) || (Y == 0 && Z == 2))) {puts("nemoguce"); return 0;}
	for(int i=0;i<2;i++) {
		for(int j=0;j<3;j++) putchar(a[i][j] ? '1' : '.');
		puts("");
	}
}

Compilation message

trapezi.cpp: In function 'int main()':
trapezi.cpp:8:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d",&n);
                ^
trapezi.cpp:10:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%s%s",a[0],a[1]);
                         ^
# Verdict Execution time Memory Grader output
1 Correct 0 ms 2020 KB Output is correct
2 Correct 0 ms 2020 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2020 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2020 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2020 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 2020 KB Output isn't correct
2 Halted 0 ms 0 KB -