Codeforces 25.E Test】的更多相关文章

E. Test time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Sometimes it is hard to prepare tests for programming problems. Now Bob is preparing tests to new problem about strings — input data…
Codeforces Round #486 (Div. 3) E. Divisibility by 25 题目连接: http://codeforces.com/group/T0ITBvoeEx/contest/988/problem/E Description You are given an integer n from 1 to 10^18 without leading zeroes. In one move you can swap any two adjacent digits in…
Codeforces Beta Round #25 (Div. 2 Only) http://codeforces.com/contest/25 A #include<bits/stdc++.h> using namespace std; #define lson l,mid,rt<<1 #define rson mid+1,r,rt<<1|1 #define sqr(x) ((x)*(x)) #define maxn 500005 typedef long long…
题目链接:http://www.codeforces.com/problemset/problem/25/A题意:在n个书中找到唯一一个奇偶性和其他n-1个数不同的数.C++代码: #include <iostream> using namespace std; ; , y = -; int main() { cin >> n; ; i <= n; i ++) { cin >> a; == ) x = (x == -) ? i : -; else y = (y =…
这两道题都需要用到拓扑排序,所以先介绍一下什么叫做拓扑排序. 这里说一下我是怎么理解的,拓扑排序实在DAG中进行的,根据图中的有向边的方向决定大小关系,具体可以下面的题目中理解其含义 Educational Codeforces Round 25  E. Minimal Labels 题目链接:http://codeforces.com/contest/825/problem/E 题意:给你一个有向无环图(DAG),有n个顶点,m条边,顶点的序号分别是1-n,现在给你1-n的数对n个顶点进行赋值…
题目网址:http://codeforces.com/contest/825/problem/B 题目:   Alice and Bob play 5-in-a-row game. They have a playing field of size 10 × 10. In turns they put either crosses or noughts, one at a time. Alice puts crosses and Bob puts noughts. In current matc…
You are given an integer nn from 11 to 10181018 without leading zeroes. In one move you can swap any two adjacent digits in the given number in such a way that the resulting number will not contain leading zeroes. In other words, after each move the…
A:链接:http://codeforces.com/contest/825/problem/A 解题思路: 一开始以为是个进制转换后面发现是我想多了,就是统计有多少个1然后碰到0输出就行,没看清题意.. 实现代码: #include<bits/stdc++.h> using namespace std; int main() { ; string s; cin>>m; cin>>s; ;i<m;i++){ ') ans++; ){ cout<<ans…
题目链接:http://codeforces.com/contest/825/problem/C C. Multi-judge Solving time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Makes solves problems on Decoforces and lots of other different onlin…
题目链接:http://codeforces.com/contest/825/problem/B B. Five-In-a-Row time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alice and Bob play 5-in-a-row game. They have a playing field of size 10 × …