Roman and Numbers time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change his…
题目链接: http://codeforces.com/problemset/problem/401/D D. Roman and Numbers time limit per test4 secondsmemory limit per test512 megabytes 问题描述 Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sere…
D. Roman and Numbers time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change h…
传送门 D. The Maths Lecture time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher…
[题目链接]:pid=5418">click here~~ [题目大意]: 问题描写叙述 经过多年的努力,Victor最终考到了飞行驾照. 为了庆祝这件事,他决定给自己买一架飞机然后环游世界. 他会驾驶一架飞机沿着规定的航线飞行.在地球上一共同拥有nn个国家,编号从11到nn.各个国家之间通过mm条双向航线连接,第ii条航线连接第u_iu​i​​个国家与第v_iv​i​​个国家,通过这条航线须要消耗w_iw​i​​升油.且从11号国家能够直接或间接到达22到nn中随意一个国家. Victo…
Codeforces Round #267 (Div. 2) C. George and Job题目链接请点击~ The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn't have enough money, so George was going to work as a programmer. Now he faced the follow…
A. Vanya and Cards time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya loves playing. He even has a special set of cards to play with. Each card has a single integer. The number on the ca…
D. Roman Digits time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Let's introduce a number system which is based on a roman digits. There are digits I, V, X, L which correspond to the numbers…
链接:https://codeforces.com/contest/1100/problem/A 题意: 给定n,k. 给定一串由正负1组成的数. 任选b,c = b + i*k(i为任意整数).将c所有c位置的数删除,求-1和1个数差值绝对值的最大值. 思路: 暴力遍历 代码: #include <bits/stdc++.h> using namespace std; int a[110]; int main() { int n,k; scanf("%d%d",&…
#include <iostream> #include <algorithm> using namespace std; int main(){ int n,m; cin >> n >> m; ) || m > (n + )* ) cout<< -; else if( n>= m) { ; i < m; ++ i) cout<<"; "; }>=m){ ; i< m - n; ++…