AtCoder Beginner Contest 402(A-F详细题解) A 思路:我们直接输出字符串中的大写字母即可。 代码:#include<bits/stdc++.h> using namespace std; #define int long long #define N 500010 signed main(){ string s;cin>>… 秋日薄雾 AtCoder Beginner Contest 403 A-G 简易题解,如果题解...
给你一个不超过四位的数,补充前导零 思路解析: printf() AC代码: #include<bits/stdc++.h>using namespacestd;typedeflonglongll;typedefunsignedlonglongull;constintmaxn=1e5+5;intmain(){ ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);intn;cin>>n;printf("%04d",n); } B题 Failing G...
AtCoder Beginner Contest 222 复盘 A. Four Digits一遍AC。int n; int main() { scanf("%d", &n); std::string str = std::to_string(n); while (str.size() != 4) str = '0' + str; printf("%s\n", str.c_str()); return 0; }B...
// Problem: D - Between Two Arrays // Contest: AtCoder - Exawizards Programming Contest 2021(AtCoder Beginner Contest 222) // URL: https://atcoder.jp/contests/abc222/tasks/abc222_d // Memory Limit: 1024 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://) #include<...
AtCoder Beginner Contest 401 A-G 简易题解,如果题解中有什么问题可以找我反馈,谢谢!(感觉这次格式搞得有点怪,回头再调下) A.Status Code直接判断即可。 int main(){ int n; cin >> n; if(n >= 200 &… 枫落发表于Atcod... 2048游戏C语言实验报告 目录一、实验目的和要求 3 二、...
AtCoder Beginner Contest 222 A题 Four Digits 题目大意: 给你一个不超过四位的数,补充前导零 思路解析: printf() AC代码: #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull;
AtCoder Beginner Contest 277录屏 菜鸡up主赛后一分钟过E破大防 https://www.bilibili.com/video/BV1YR4y1Z7xf/ AtCoder Beginner Contest 277 E // 最短路 https://www.cnblogs.com/jakon/p/16888643.html https://www.cnblogs.com/empty-y/p/16886860.html ...
B. Find snuke 枚举一个起点,再枚举方向,然后检验。 C. Almost Equal 用std::next_permutation枚举全排列。 D. Impartial Gift 把 排序,枚举 ,二分找到 中不超过 的最大的数,如果它不小于 则更新答案。 也可以把两个数组都排序之后双指针。 也可以每次检查两个数组中最大的数,如果差不超过 ...
We will hold KEYENCE Programming Contest 2021 (AtCoder Beginner Contest 227). Contest URL: https://atcoder.jp/contests/abc227 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20211113T2100&p1=248 Duration: 100 minutes Number of Tasks: 8 Writer: blackyuki, kyopro_...
题意: 题解 利用一个数能被3整除当且仅当其各位之和sum能被3整除。 如果sum本身能被3整除,则不需要删除。 否则统计原数的每一位数%3后的个数,比较%3 =1与%3 =2 的个数,有两种方法可以使其sum变为 %3 =0: %3=1 与%3=2,相互抵消,还剩下的差值即为答案。