Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<cstdio>
- #include<algorithm>
- using namespace std;
- int r,p1[10010],p2[10010],t,n,sol;
- int main(){
- sol = 0;
- scanf("%d",&t);
- for(int i = 0;i < t;i++){
- scanf("%d %d",&n ,&r);
- for(int j = 0;j < r;j++){
- scanf("%d %d",&p1[j],p2[j]);
- }
- for(int j = 0;j < r;j++){
- for(int k = 0;k < r;k++){
- if(p1[j]==p2[k]){
- sol = 1;
- }
- }
- }
- if(sol == 1){
- printf("Scenario #%d:spied",i);
- }
- else{
- printf("Scenario #%d:spying",i);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement