Submission #205747

#TimeUsernameProblemLanguageResultExecution timeMemory
205747ly20Political Development (BOI17_politicaldevelopment)C++17
4 / 100
7 ms380 KiB
#include <bits/stdc++.h>
using namespace std;
int main() {
	int n, k;
	scanf("%d %d", &n, &k);
	bool ok = false;
	for(int i = 0; i < n; i++) {
		int a;
		scanf("%d", &a);
		if(a > 0) ok = true;
		for(int j = 0; j < a; j++) {
			int b;
			scanf("%d", &b);
		}
	}
	if(ok) printf("2\n");
	else printf("1\n");
	return 0;
}

Compilation message (stderr)

politicaldevelopment.cpp: In function 'int main()':
politicaldevelopment.cpp:5:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &n, &k);
  ~~~~~^~~~~~~~~~~~~~~~~
politicaldevelopment.cpp:9:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &a);
   ~~~~~^~~~~~~~~~
politicaldevelopment.cpp:13:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d", &b);
    ~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...