J. Deck Shuffling Time Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/J Description The world famous scientist Innokentiy continues his innovative experiments with decks of cards. Now he has a deck of n cards and k…
Problem A. Poetry Challenge Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100500/attachments Description Let’s check another challenge of the IBM ICPC Chill Zone, a poetry challenge. One says a poetry string that starts with a…
题目链接:http://codeforces.com/contest/580/problem/C #include<cstdio> #include<vector> #include<cstring> #define MAX 100010 using namespace std; vector <int> a[MAX]; int visit[MAX]; int cat[MAX]; int leaf[MAX]; int ans,m; void dfs(int…
B. Bear and Friendship Condition time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Bear Limak examines a social network. Its main functionality is that two members can become friends (then th…
题目链接:http://codeforces.com/problemset/problem/117/C C. Cycle time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output A tournament is a directed graph without self-loops in which every pair of ve…