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. Straight «A» 题面 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. However, she has to get an «A» graduation certificate in order to apply to a prestigious one. In school, w…
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.…
B. Summer sell-off time limit per test   1 second memory limit per test   256 megabytes   Summer holidays! Someone is going on trips, someone is visiting grandparents, but someone is trying to get a part-time job. This summer Noora decided that she w…
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.…
CodeForces - 810A 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 univ…
A:考虑每对最大值最小值的贡献即可. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long #define N 300010 #define P 1000000007 char getc(){…
反正又是一个半小时没做出来... 先排序,然后求和,第i个和第j个,f(a)=a[j]-a[i]=a[i]*(2^(j-i-1))因为从j到i之间有j-i-1个数(存在或者不存在有两种情况) 又有a[i+k]-a[i]=a[n]+a[n-1]+...+a[n-k]-a[k+1]-...-a[1] #include<map> #include<set> #include<cmath> #include<queue> #include<stack>…
C. Do you want a date?   2 seconds 256 megabytes   Leha decided to move to a quiet town Vičkopolis, because he was tired by living in Bankopolis. Upon arrival he immediately began to expand his network of hacked computers. During the week Leha manage…
1. CF 809C Find a car 大意: 给定一个$1e9\times 1e9$的矩阵$a$, $a_{i,j}$为它正上方和正左方未出现过的最小数, 每个询问求一个矩形内的和. 可以发现$a_{i,j}=(i-1)\oplus (j-1)+1$, 暴力数位$dp$即可 #include <iostream> #include <sstream> #include <algorithm> #include <cstdio> #include <…