当前位置: 首页 > news >正文

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 secondvoid 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
*/

菜狗是这样的先睡了


http://www.mrgr.cn/news/30316.html

相关文章:

  • MATLAB系列09:图形句柄
  • 基于SpringBoot+Vue+MySQL的智能物流管理系统
  • CISP备考题库(八)
  • JavaScript Array 数组对象
  • HubSpot Sales Hub 是什么 | HubSpot Sales Hub:推动业务全球化的智能销售引擎
  • 【60天备战2024年11月软考高级系统架构设计师——第21天:系统架构设计原则——高内聚低耦合】
  • 0.5.4 知识库管理微调
  • 把设计模式用起来!(3)用不好模式?之时机不对
  • 【学习资料】袋中共36个球,红白黑格12个,问能一次抽到3个红4个白5个黑的概率是多少?
  • 微信小程序案例:比较数字大小(含代码)
  • 9月19日,每日信息差
  • 入门数据结构JAVA DS——二叉树的介绍 (构建,性质,基本操作等) (1)
  • SpringCloud系列之一---搭建高可用的Eureka注册中心
  • 组件封装有哪些注意事项—面试常问优美回答
  • csgo使用服务器一键开服联机
  • Vue2+vue-office/excel 实现在线加载Excel文件预览
  • 图的数据结构定义
  • 音视频入门基础:AAC专题(9)——FFmpeg源码中计算AAC裸流每个packet的duration和duration_time的实现
  • maxwell 输出消息到 redis
  • 微信小程序页面制作——婚礼邀请函(含代码)