做了三个题,先贴一下代码...终于涨分了 A. Line to Cashier 水题 #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; <<); int main() { ], ans; int i, j;…
C - Curious Array 思路:对于区间[l, r]每个数加上C(i - l + k, k), 可以在l处+1, 在r+1处-1, 然后做k+1次求前缀和操作,然后就可以写啦. 然后逐层求前缀和的时候r+1上都要减去一个组合数. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PII pair<int, int…
time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard output There is a right triangle with legs of length a and b. Your task is to determine whether it is possible to locate the triangle on the plane in s…
B. Long Path time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output One day, little Vasya found himself in a maze consisting of (n + 1) rooms, numbered from 1 to (n + 1). Initially, Vasya is at th…
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems # Name A Team Olympiad standard input/output 1 s, 256 MB x2377 B Queue standard input/output 2 s, 256 MB x1250 C Hacking Cypher standard input/output 1 s, 256 MB x740 D Chocolate standard in…
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…