A. Straight «A» time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output Noora is a student of one famous high school. It's her final year in school — she is going to study in university next year.…
做了三个题,先贴一下代码...终于涨分了 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;…
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…
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…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
A. Meeting of Old Friends time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Today an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried Sonya! Sony…
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…