Submission #971570

# Submission time Handle Problem Language Result Execution time Memory
971570 2024-04-29T02:30:03 Z vjudge1 Pizza (COCI21_pizza) C++17
50 / 50
1 ms 436 KB
#include<bits/stdc++.h>
using namespace std;
int n,m,k,b;
int gaksuka[100];

bool search(int cari){
	for(int i=0; i<n;i++){
		if(cari == gaksuka[i]) return false;
	}
	return true;
}

int main(){
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>gaksuka[i];
	}
	
	cin>>m; 
	int count=0;
	bool bisa = true;
	
	while(m--){
		cin>>k;
		bisa = true;
		while(k--){
			cin>>b;
			if(!search(b)) bisa = false; continue;
		}
		if(bisa) count++;
	}
	cout<<count;
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:28:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   28 |    if(!search(b)) bisa = false; continue;
      |    ^~
Main.cpp:28:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   28 |    if(!search(b)) bisa = false; continue;
      |                                 ^~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct