답안 #97894

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
97894 2019-02-19T10:55:28 Z AKaan37 Baza (COCI17_baza) C++14
0 / 50
171 ms 13088 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)

const int inf = 1000000000;
const int mod = 1000000007;
const int KOK = 100000;
const int li = 100005;
const int LOG = 20;

lo n,m,cev,x,k,b[li],a[1005][1005];
vector<int> v;
char c;
string s;

int main(){
	scanf("%lld %lld",&n,&m);
	FOR{
		for(lo j=1;j<=m;j++){
			scanf("%lld",&a[i][j]);
		}
	}
	lo t=0;
	scanf("%lld",&t);
	while(t--){
		cev=0;
		for(lo i=1;i<=m;i++){
			scanf("%d",&b[i]);
		}
		for(lo i=1;i<=n;i++){
			lo flag=0;
			for(lo j=1;j<=m;j++){
				if(a[i][j]!=b[j] && b[j]!=-1) flag=1;
			}
			if(flag==0) cev++;
		}
		printf("%lld\n",cev);
	}
	return 0;
}

Compilation message

baza.cpp: In function 'int main()':
baza.cpp:38:20: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'lo* {aka long long int*}' [-Wformat=]
    scanf("%d",&b[i]);
               ~~~~~^
baza.cpp:27:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld",&n,&m);
  ~~~~~^~~~~~~~~~~~~~~~~~~
baza.cpp:30:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%lld",&a[i][j]);
    ~~~~~^~~~~~~~~~~~~~~~~
baza.cpp:34:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&t);
  ~~~~~^~~~~~~~~~~
baza.cpp:38:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d",&b[i]);
    ~~~~~^~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 49 ms 3832 KB Output isn't correct
2 Incorrect 30 ms 3832 KB Output isn't correct
3 Incorrect 96 ms 10704 KB Output isn't correct
4 Incorrect 22 ms 3320 KB Output isn't correct
5 Incorrect 59 ms 6008 KB Output isn't correct
6 Incorrect 97 ms 9592 KB Output isn't correct
7 Incorrect 171 ms 13088 KB Output isn't correct
8 Incorrect 128 ms 8020 KB Output isn't correct
9 Incorrect 60 ms 7672 KB Output isn't correct
10 Incorrect 133 ms 10716 KB Output isn't correct