2024ICPC第一场网络赛补题
The 2024 ICPC Asia East Continent Online Contest (I) - Dashboard - Contest - QOJ.ac
World Cup
静下心模拟很容易推,16round的时候,分成第一和第二的情况,如果第一就得赢3+3队,第二得赢2+4队,推出来6,后面double再+1就好。主要得沉下心简单推下。
#include<bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using ari = std::array<int, 3>;
using PII = std::pair<int, int>;
const int N = 2e5 + 10;
const int mod = 1e9 + 7;
const double eps = 1e-6;
int a[N], b[N];
void solve() {
for (int i = 1; i <= 32; i++) {
std::cin >> a[i];
}
ll cnt = 0;
for (int i = 1; i <= 32; i++) {
if (a[i] < a[1]) cnt++;
}
if (cnt < 2) {
std::cout << 32 << '\n';
} else if (cnt < 6) {//至少6队比它菜
std::cout << 16 << '\n';
} else if (cnt < 13) {
std::cout << 8 << '\n';
} else if (cnt < 27) {
std::cout << 4 << '\n';
} else if (cnt < 31) {
std::cout << 2 << '\n';
} else std::cout << 1 << '\n';
}
signed main() {
std::ios::sync_with_stdio(0);
std::cin.tie(0);
int t = 1;
std::cin >> t;
while (t--) {
solve();
}
return 0;
}
Find the Easiest Problem - Problem - QOJ.ac
鉴定为pta nt模拟。。
#include<bits/stdc++.h>
using ll = long long;
using ull = unsigned long long;
using ari = std::array<int, 3>;
using PII = std::pair<int, int>;
const int N = 2e3 + 10;
const int mod = 1e9 + 7;
const double eps = 1e-6;
#define fir first
#define sec second
void solve() {
int n;
std::cin >> n;
std::map<char, std::set<std::string> > mp;
for (int i = 1; i <= n; i++) {
std::string a, c;
char b;
std::cin >> a >> b >> c;
if (c != "accepted") continue;
mp[b].insert(a);
}
ll ans = 0;
char res;
for (auto &i: mp) {
if (ans < i.sec.size()) {
ans = i.sec.size();
res = i.fir;
}
}
std::cout << res << '\n';
}
signed main() {
std::ios::sync_with_stdio(0);
std::cin.tie(0);
int t = 1;
std::cin >> t;
while (t--) {
solve();
}
return 0;
}
/*
2
5
teamA A accepted
teamB B rejected
teamC A accepted
teamB B accepted
teamD C accepted
4
teamA A rejected
teamB A accepted
teamC B accepted
teamC B accepted
*/
菜狗是这样的先睡了