Codeforces Round #235 (Div. 2)】的更多相关文章

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…
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…
#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; ++…
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int x,k; cin >> x >> k; vector<, false); num[x] = true; ; i < k ; ++ i){ int index, num1,num2; cin >> index; ){ cin >&…
#include <iostream> using namespace std; int main(){ int n,x; cin >> n >> x; ; ; i < n ; ++ i){ int number; cin>> number; sum +=number; } ) sum = -sum; cout<<(sum%x ? sum/x+ : sum/x) <<endl; }…
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…
C. Team time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Now it's time of Olympiads. Vanya and Egor decided to make his own team to take part in a programming Olympiad. They've been best fri…
以为是组合,后来看着像数位dp,又不知道怎么让它不重复用..然后就没思路 了. 其实状压就可以了 状压是可以确定一个数的使用顺序的 利用01也可以确定所有的数的使用以及不重复 dp[i+1<<e][(j*10+p[e])%m]+=dp[i][j]; 排下序去掉重复的 或者最后除去每个数出现的次数 #include <iostream> #include<cstdio> #include<cstring> #include<algorithm> #…
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate it n = int(raw_input()) s = "" a = ["I hate that ","I love that ", "I hate it","I love it"] for i in ran…