题面 题意:每天有K本书,你最多看P本一天,问N天后多少本书没有看 题解:ans=(K-P)*N; 注意一点就是P>=K的时候,ans=0; #include<bits/stdc++.h> using namespace std; #define lld long long lld x,y,z; int main() { int T; scanf("%d",&T); while (T--) { scanf("%lld%lld%lld",&a…
Problem C: LCR 题目连接: http://codeforces.com/gym/100646/attachments Description LCR is a simple game for three or more players. Each player starts with three chips and the object is to be the last person to have any chips. Starting with Player 1, each…
Ballot Analyzing Device 题目连接: http://codeforces.com/gym/100269/attachments Description Election committee of Flatland is preparing for presidential elections. To minimize human factor in ballot counting they decided to develop an automated Ballot Ana…
题目链接 给定一个字符串.输入是int& a*[]&, b, c*; 输出是 int&&[]* a;int& b;int&* c; 输入格式里逗号后面一定有个空格,把字母后面的符号逆序拿到前面来,按每个逗号分隔输出即可. 注意输出格式一定是定义类型+符号+空格+字母或字符串+分号. #include <iostream> #include <cstdio> #include <cmath> #include <cst…
题意:good element的定义是a[i]在1~i-1中任取三个数(可以重复)的和能等于a[i] 思路:vis[x]标记一下任两个数的和,处理a[i]时枚举1~i-1判断vis[a[i] - a[j]]是否被标记 #include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include <deque>…
Gym - 101915A  Printing Books 题意:有一本书,从第X页开始,一共用了n位数字,求此书一共多少页.99就是两位数字,100就是三位数字. 思路:直接模拟即可,我用了一个high和一个low,因为我把数字按位数分成了几个部分,1-9,10-99,100-999等(实际上high会等于1000),这样就会low = 100,high = 999之类的了,如果遇到边界,比如刚开始时,low和high有所调整,比如low=x,high=999,以方便计算. #include<…
bryce1010模板 http://codeforces.com/gym/101810/problem/A 大模拟,写崩了,代码借队友的...... 注意处理段与段的连接问题: #include<bits/stdc++.h> using namespace std; const int maxn=1e5+5; struct node{ long long l,r,val; node(){} node(long long ll,long long rr,long long vval) { l=…
原文链接:http://blog.csdn.net/jinzhuojun/article/details/78508203 前段时间Nature上发表的升级版Alpha Go - AlphaGo Zero再一次成为热点话题.作为其核心技术之一的Deep reinforcement learning(深度增强学习,或深度强化学习)也再一次引发关注.Alpha Zero最有意义的地方之一是它去除了从人类经验(棋谱)中学习的过程,而是完全通过“左右互博”式的学习击败了自己的“前辈”.这也很能体现强化学…
 Gym 101047K Training with Phuket's larvae Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Practice Description standard input/output Thai cuisine is known for combining seasonings so that every dish has flavors that are…
题目链接: http://codeforces.com/gym/100825 题目大意: 栅栏密码.给定N(N<=10),密钥为一个N*N的矩阵,'.'代表空格可以看到,'X'代表被遮挡,还有密文字符串S,长度为N*N 每次将这个矩阵顺时针旋转90°,把矩阵中空格对应的位置按照从上到下从左到右的顺序依次填充上密文字符,求最终这个密文字符能否填满N*N的矩阵,能按顺序输出得到的答案,不能输出"invalid grille" 题目思路: [模拟] 直接模拟即可.旋转的坐标公式很好推.…