We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c61910 commit 978b1e8Copy full SHA for 978b1e8
1 file changed
QOJ/14948.cpp
@@ -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
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