# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
971290 |
2024-04-28T10:53:21 Z |
vjudge1 |
Pizza (COCI21_pizza) |
C++17 |
|
1 ms |
436 KB |
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int n;
cin>>n;
int larang[n+1];
for(int t=1;t<=n;t++){
cin>>larang[t];
}
int cnt=0;
int tc;
cin>>tc;
while(tc--){
int a;
cin>>a;
int angka[a+1];
for(int d=1;d<=a;d++){
cin>>angka[d];
}
bool hmm=true;
for(int y=1;y<=n;y++){
int l=1,r=a;
while(l<=r){
int mid=(l+r)/2;
if(angka[mid]<larang[y]){
l=mid+1;
}
else if(angka[mid]>larang[y]){
r=mid-1;
}
else{
hmm=false;
break;
}
}
if(hmm==false){
break;
}
}
if(hmm==true)cnt++;
}
cout<<cnt<<endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
436 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
416 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |