Submission #1039608

# Submission time Handle Problem Language Result Execution time Memory
1039608 2024-07-31T05:28:52 Z pcc Parking (CEOI22_parking) C++17
2 / 100
31 ms 11980 KB
#include <bits/stdc++.h>
using namespace std;

const int mxn = 2e5+10;
vector<int> pos[mxn];
int arr[mxn][2];
int N,M;
bitset<mxn> vis;

int main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin>>N>>M;
	for(int i = 1;i<=M;i++){
		for(int j = 0;j<2;j++){
			cin>>arr[i][j];
			pos[arr[i][j]].push_back((i<<1)|j);
		}
	}
	int ans = 0;
	for(int i = 1;i<=N;i++){
		int p1 = pos[i][0],p2 = pos[i][1];
		if((p1^p2) == 1)ans += 0;
		else{
			if(!(p1&1)&&arr[p1>>1][1])ans++;
			if(!(p2&1)&&arr[p2>>1][1])ans++;
			if(!(p1&1)&&!(p2&1))ans++;
		}
	}
	cout<<ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 4952 KB Output is partially correct
2 Partially correct 3 ms 4956 KB Output is partially correct
3 Partially correct 3 ms 4952 KB Output is partially correct
4 Incorrect 3 ms 4956 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 29 ms 11204 KB Output is partially correct
2 Partially correct 31 ms 11980 KB Output is partially correct
3 Partially correct 25 ms 11468 KB Output is partially correct
4 Partially correct 24 ms 11212 KB Output is partially correct
5 Partially correct 31 ms 11976 KB Output is partially correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4952 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4952 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 5212 KB Output is partially correct
2 Incorrect 2 ms 5164 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 4952 KB Output is partially correct
2 Partially correct 3 ms 4956 KB Output is partially correct
3 Partially correct 3 ms 4952 KB Output is partially correct
4 Incorrect 3 ms 4956 KB Output isn't correct
5 Halted 0 ms 0 KB -