摘要: B. Contest Preparation 对n<=m和n==0时特判一下 #include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <cstring> #include <vecto 阅读全文
posted @ 2023-05-14 12:47 Ke_scholar 阅读(27) 评论(0) 推荐(0) 编辑
摘要: A. Remove Duplicates 题意大概就是从左到右数字最先数完的最先输出 所以我们可以在输入每个数时记录每个数的出现次数,然后在循环一遍,每次该数字的次数减1,当数字的次数只剩1的时候就输出这个数字. #include <bits/stdc++.h> //#define inf 0x3f 阅读全文
posted @ 2023-05-04 21:56 Ke_scholar 阅读(7) 评论(0) 推荐(0) 编辑
摘要: A. Wrong Subtraction 在k次操作里, 将n的最后一位数减1,如果是0就去掉,模拟一下就好了. #include <bits/stdc++.h> //#define inf 0x3f3f3f3f #define endl '\n' #define int long long usi 阅读全文
posted @ 2023-04-26 00:38 Ke_scholar 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 题目详情 - L1-1 人与神 (pintia.cn) 换成php直接输出( To iterate is human, to recurse divine. 题目详情 - L1-2 两小时学完C语言 (pintia.cn) void solve() { cin >> n >> k >> m; cou 阅读全文
posted @ 2023-04-16 16:49 Ke_scholar 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 题目详情 - L1-1 今天我要赢 (pintia.cn) void solve() { cout << "I'm gonna win! Today!" << endl; cout << "2022-04-23" << endl; } 题目详情 - L1-2 种钻石 (pintia.cn) void 阅读全文
posted @ 2023-04-11 23:24 Ke_scholar 阅读(15) 评论(0) 推荐(0) 编辑
摘要: L1-1 自动编程 void solve() { int x; cin >> x; cout << "print(" << x << ")"; } L1-2 太神奇了 void solve() { cin >> n >> m; cout << n + m - 1 << endl; } L1-3 洛希 阅读全文
posted @ 2023-04-11 23:13 Ke_scholar 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 排列数 算是记录一个求全排列的方法吧,() #include <iostream> #include <string.h> #include <stdio.h> #include <vector> #include <map> #include <queue> #include <algorithm 阅读全文
posted @ 2023-04-05 11:47 Ke_scholar 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 小石的图形 太坑了, π的精度一定要开大,不然就wa, 建议用acos(-1)或者M_PI. #include<bits/stdc++.h> #define endl '\n' #define int long long #define inf 0x3f3f3f3f using namespace 阅读全文
posted @ 2023-04-05 04:37 Ke_scholar 阅读(18) 评论(0) 推荐(0) 编辑
摘要: L1-1小乐乐是否被叫家长 #include<bits/stdc++.h> #define endl '\n' using namespace std; typedef long long ll; const int N = 1e5+10; int n,m,t; int main() { ios:: 阅读全文
posted @ 2023-04-04 00:15 Ke_scholar 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 被鸽了的课本 A-被鸽了的课本_西南民族大学 春季 2023 训练赛 2 (nowcoder.com) #include<bits/stdc++.h> #define int long long #define endl '\n' using namespace std; const int N = 阅读全文
posted @ 2023-03-30 12:02 Ke_scholar 阅读(17) 评论(0) 推荐(0) 编辑