Avito Cool Challenge 2018 自闭记】的更多相关文章

A:n==2?2:1. #include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> using namespace std; #define ll long long ')) c=getchar();return c;} ?n:gcd(m,n%m);} int read() { ,…
Codeforces Avito Code Challenge 2018 D. Bookshelves 题目连接: http://codeforces.com/contest/981/problem/D Description Mr Keks is a typical white-collar in Byteland. He has a bookshelf in his office with some books on it, each book has an integer positive…
再次作死的打了一次cf的修仙比赛感觉有点迷.. 还好掉的分不多(原本就太低没法掉了QAQ) 把会做的前三道水题记录在这.. A: Antipalindrome emmmm...直接暴力枚举 code: //By Menteur_Hxy #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> using namespace std; int n,ans; cha…
考挂了.. A - Definite Game 直接看代码吧. #include<cstdio> #include<cstring> #include<algorithm> #include<queue> #include<set> #include<map> #include<vector> #include<cmath> #include<cctype> using namespace std;…
A. Definite Game: 题意:输入N,输出最小的结果N-x,其中x不少N的因子. 思路:N=2时,输出2:其他情况输出1:因为N>2时,N-1不会是N的因子. #include<bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<=b;i++) using namespace std; ; int a[maxn]; int main() { int N; cin>>N; ) puts("); "…
第一次打CF,很菜,A了三道水题,第四题好像是是数位DP,直接放弃了.rateing从初始的1500变成了1499,还是绿名,这就很尴尬.之后觉得后面的题目也没有想象的那么难(看通过人数)过两天吧剩下的五题给补上. http://codeforces.com/contest/981 A:给你一个字符串S,求把这个字符串中的最长不回文子序列. 思路: 如果S不回文,那就是本身 如果S回文: (1)如果S由一种字母构成,那么最长不回文子序列为空,因为无论删除多少个都是回文串. (2)如果S不是上述情…
A. Definite Game 签. #include <bits/stdc++.h> using namespace std; int main() { int a; while (scanf("%d", &a) != EOF) { [](int x) { ; i >= ; --i) if (x % i) { printf("%d\n", x - i); return; } printf("%d\n", x); }(…
传送门:http://codeforces.com/contest/1081/problem/E E. Missing Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Chouti is working on a strange math problem. There was a sequence of nn …
传送门:http://codeforces.com/contest/1081/problem/C C. Colorful Bricks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output On his free time, Chouti likes doing some housework. He has got one new…
传送门:http://codeforces.com/contest/1081/problem/B B. Farewell Party time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Chouti and his classmates are going to the university soon. To say goodbye…