An express train to reveries time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sengoku still remembers the mysterious "colourful meteoroids" she discovered with Lala-chan when they were…
B. An express train to reveries time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sengoku still remembers the mysterious "colourful meteoroids" she discovered with Lala-chan when they we…
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Sengoku still remembers the mysterious "colourful meteoroids" she discovered with Lala-chan when they were little. In particular, one of…
题目链接:http://codeforces.com/problemset/problem/814/B 题目意思:分别给定一个长度为 n 的不相同序列 a 和 b.这两个序列至少有 i 个位置(1 ≤ i ≤ n ), a[i] != b[i] .现在需要构造一个长度为 n,每个数只能取值1~n 且只能取值一次的序列 p, 使得恰好存在有一个位置 i(1 ≤ i ≤ n ), ai ≠ pi .和恰好存在一个位置 j (1 ≤ j ≤ n) , bj ≠ pj ,保证这个序列 p 有n-1个位…
http://codeforces.com/problemset/problem/814/B 构造题烦死人,一开始我还记录一大堆信息来构造p数列,其实因为s数列只有两项相等,也正好缺了一项,那就把两种情况构造出来暴力验证对不对就行了. #include<bits/stdc++.h> using namespace std; #define ll long long int n; ]; ]; ]; ]; ]; int main(){ scanf("%d",&n); ;…
终判才知道自己失了智.本场据说是chinese专场,可是请允许我吐槽一下题意! A. An abandoned sentiment from past shabi贪心手残for循环边界写错了竟然还过了初判.回宿舍想想发现只要k大于1,可以直接输出Yes的. const int N=1e6+5; int a[N],b[N]; //char s[N]; int cmp(int a,int b) { return a>b; } int main() { int n,k; while(~scanf(&quo…
A An abandoned sentiment from past 水题 #include<bits/stdc++.h> using namespace std; int a[300],b[300],n,k; bool cmp(int a,int b) { return a>b; } int main() {//freopen("t.txt","r",stdin); scanf("%d%d",&n,&k); f…
D - AtCoder Express Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement In the year 2168, AtCoder Inc., which is much larger than now, is starting a limited express train service called AtCoder Express. In the plan developed…