目录 A B C A 模拟出A不是最大值的情况,存起来. 最多有n个.当A为最大值的时候,后面n-1个数开始循环. 查询分两种情况讨论就行了 #include <bits/stdc++.h> #define ll long long using namespace std; const int _=2e5+7; ll read() { ll x=0,f=1;char s=getchar(); for(;s>'9'||s<'0';s=getchar()) if(s=='-') f=-…
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... 其实这个应该是昨天就写完的,不过没时间了,就留到了今天.. 地址:http://codeforces.com/contest/651/problem/A A. Joysticks time limit per test 1 second memory limit per test 256…
CF memsql Start[c]UP 2.0 A A. Golden System time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Piegirl got bored with binary, decimal and other integer based counting systems. Recently she dis…
CF memsql Start[c]UP 2.0 B B. Distributed Join time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Piegirl was asked to implement two table join operation for distributed database system, minim…