Skip to content

Commit 978b1e8

Browse files
committed
Volunteer Simulator
1 parent 1c61910 commit 978b1e8

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

QOJ/14948.cpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @file 14948.cpp
3+
* @author Macesuted (i@macesuted.moe)
4+
* @date 2025-11-12
5+
*
6+
* @copyright Copyright (c) 2025
7+
*
8+
*/
9+
10+
#include <bits/stdc++.h>
11+
using namespace std;
12+
13+
#define endl '\n'
14+
15+
bool ac[450][20];
16+
int cnt[450];
17+
18+
void solve(void) {
19+
int n;
20+
cin >> n;
21+
while (n--) {
22+
int a, b, c;
23+
cin >> a >> b >> c;
24+
25+
if (ac[a][b]) {
26+
cout << 0 << endl;
27+
continue;
28+
}
29+
30+
if (c < 240 || cnt[a] < 3)
31+
cout << b << endl;
32+
else
33+
cout << 0 << endl;
34+
35+
ac[a][b] = true, cnt[a]++;
36+
}
37+
38+
return;
39+
}
40+
41+
int main() {
42+
ios::sync_with_stdio(false), cin.tie(nullptr);
43+
44+
int _ = 1;
45+
while (_--) solve();
46+
47+
return 0;
48+
}

0 commit comments

Comments
 (0)