Submission #896111

# Submission time Handle Problem Language Result Execution time Memory
896111 2023-12-31T20:06:39 Z Abdalaziz_Alshami Event Hopping (BOI22_events) C++17
0 / 100
279 ms 18516 KB
#include<iostream>
#include<map>
#include<set>
#include<utility>
#define st first
#define ed second
#define int int64_t
using namespace std;
signed main()
{
	int n,q; cin>>n>>q;
	map<int,set<int>>m;
	for(int i=0;i<n;i++)
	{
		int u,v; cin>>u>>v;
		m[u].insert(v);
	}
	while(q--)
	{
		int u,v;  cin>>u>>v;
		if(m[u].count(v)) cout<<1<<endl;
		else  cout<<"impossible"<<endl;
	}
}
# 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 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 279 ms 18516 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -