답안 #96697

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
96697 2019-02-11T05:16:50 Z nandonathaniel Kocka (COCI18_kocka) C++14
70 / 70
70 ms 5808 KB
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
LL l[100005],r[100005],u[100005],d[100005];

int main(){
	LL n;
	scanf("%ld",&n);
	for(int i=1;i<=n;i++){
		scanf("%lld",&l[i]);
	}
	for(int i=1;i<=n;i++){
		scanf("%lld",&r[i]);
	}
	for(int i=1;i<=n;i++){
		scanf("%lld",&u[i]);
	}
	for(int i=1;i<=n;i++){
		scanf("%lld",&d[i]);
	}
	int cnt=0;
	for(int i=1;i<=n;i++){
		if(l[i]==-1 && r[i]!=-1)cnt++;
		if(l[i]!=-1 && r[i]==-1)cnt++;
		if(u[i]==-1 && d[i]!=-1)cnt++;
		if(u[i]!=-1 && d[i]==-1)cnt++;
	}
	if(cnt==0){
		printf("DA\n");
	}
	else printf("NE\n");
	return 0;
}

Compilation message

kocka.cpp: In function 'int main()':
kocka.cpp:8:16: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type 'LL* {aka long long int*}' [-Wformat=]
  scanf("%ld",&n);
              ~~^
kocka.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%ld",&n);
  ~~~~~^~~~~~~~~~
kocka.cpp:10:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&l[i]);
   ~~~~~^~~~~~~~~~~~~~
kocka.cpp:13:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&r[i]);
   ~~~~~^~~~~~~~~~~~~~
kocka.cpp:16:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&u[i]);
   ~~~~~^~~~~~~~~~~~~~
kocka.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld",&d[i]);
   ~~~~~^~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 404 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 504 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 63 ms 5304 KB Output is correct
2 Correct 56 ms 5728 KB Output is correct
3 Correct 55 ms 5740 KB Output is correct
4 Correct 39 ms 4596 KB Output is correct
5 Correct 50 ms 5752 KB Output is correct
6 Correct 52 ms 5752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 52 ms 5568 KB Output is correct
2 Correct 34 ms 4672 KB Output is correct
3 Correct 56 ms 5752 KB Output is correct
4 Correct 42 ms 4728 KB Output is correct
5 Correct 52 ms 5808 KB Output is correct
6 Correct 53 ms 5496 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 47 ms 5368 KB Output is correct
2 Correct 37 ms 4600 KB Output is correct
3 Correct 70 ms 5772 KB Output is correct
4 Correct 58 ms 5752 KB Output is correct
5 Correct 51 ms 5752 KB Output is correct
6 Correct 35 ms 4600 KB Output is correct