
cf
king9666
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #620 (Div. 2) D. Shortest and Longest LIS
D. Shortest and Longest LIS传送门#include<cstdio>#include<algorithm>#include<cstring>using namespace std;int t,n,p[300005];char str[300005];int main(){ scanf("%d",&t); wh...原创 2020-02-17 21:29:10 · 177 阅读 · 0 评论 -
Codeforces Round #620 (Div. 2) C.Air Conditioner
C.Air Conditioner传送门#include<cstdio>#include<algorithm>#include<cstring>#define ll long longusing namespace std;int n;ll m,l,r,t;int main(){ int T; scanf("%d",&T); w...原创 2020-02-17 21:16:39 · 147 阅读 · 0 评论 -
Codeforces Round #620 (Div. 2)Two Rabbits
A. Two Rabbits传送门#include <stdio.h>typedef long long ll;int main(){ int t; ll n, m, a, b; scanf("%d",&t); while(t--) { scanf("%lld %lld %lld %lld...原创 2020-02-17 20:55:01 · 147 阅读 · 0 评论 -
Happy Birthday (Codeforces思维➕枚举)
Happy Birthday#include <bits/stdc++.h>using namespace std;const int N = 1e6+5;int a[11];int main(){ int n; cin>>n; for(int i = 0 ; i < n ; i ++) { for (i...原创 2020-02-01 21:33:05 · 320 阅读 · 0 评论 -
F - Data Center codeforces补题(应该有更好的方法)
You are developing a project to build a new data center. The data center will be a rectangle with an area of exactly n square meters. Each side of the data center must be an integer.Your goal is to m...原创 2020-02-01 20:28:48 · 269 阅读 · 0 评论 -
Codeforces Round #614 (Div. 2) C. NEKO's Maze Game(小思维模拟)
C. NEKO’s Maze Game#include <cstdio>#define Maxn 100005int n,q;int r[Maxn],c[Maxn];bool mp[2][Maxn];int main(){ scanf("%d%d",&n,&q); int num=0; for(int i=1;i<=q;i++){ scanf...原创 2020-01-21 10:29:05 · 143 阅读 · 0 评论 -
Codeforces Round #614 (Div. 2) B.JOE is on TV! (高精度)
B. JOE is on TV!#include<iostream>#include<cstdio>using namespace std;#define N 100005int n;double f[N];int main(){ scanf("%d",&n); int i; double ans=0.0; for(i=1;i<=n;i+...原创 2020-01-21 10:07:02 · 183 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2) E. Messenger Simulator
E. Messenger Simulator传送门#include <bits/stdc++.h>#include <ext/pb_ds/assoc_container.hpp> using namespace std;using namespace __gnu_pbds; template<class T> using ordered_set ...原创 2020-01-16 21:17:37 · 233 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2) D
D - Minimax Problem传送门#include <iostream>constexpr int N = 300000, M = 8;int n, m, x, y, tot;int a[N][M], id[1 << M];bool solve(int v) { std::fill(id, id + tot, -1); for (int...原创 2020-01-15 21:38:32 · 147 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2) C
C. Two Arrays传送门#include<bits/stdc++.h>using namespace std;typedef LL long long;const int N=1005, M=15, P=1000000007;int f[M][N];int main(){ int n,m; scanf("%d%d",&n,&m);...原创 2020-01-15 21:29:50 · 125 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2) B
B. Yet Another Meme Problem传送门#include<stdio.h>int main(){ int t; for(scanf("%d",&t);t--;) { long long n, d, c = 0, t = 9; scanf("%lld %lld",&n,&d); ...原创 2020-01-15 21:21:08 · 131 阅读 · 0 评论 -
Educational Codeforces Round 80 (Rated for Div. 2) A
A. Deadline传送门#include "bits/stdc++.h"using namespace std;int main(){ int t; for(scanf("%d",&t);t--;) { int m , d ,ans = 1e9; scanf("%d %d",&m,&d); ...原创 2020-01-15 20:39:26 · 102 阅读 · 0 评论 -
Codeforces Round #613 (Div. 2) C. Fadi and LCM
C. Fadi and LCM传送门#include<bits/stdc++.h>using namespace std;#define ll long longint main() { ios::sync_with_stdio(0); cin.tie(0); ll x; cin>>x; ll ans = x; for(ll i=1;i*i...原创 2020-01-12 20:01:46 · 197 阅读 · 0 评论 -
Codeforces Round #613 (Div. 2) B
B. Just Eat It!传送门#include <bits/stdc++.h>using namespace std; typedef long long ll; const int Maxn = 100005; int t;int n;int a[Maxn]; int main(){ scanf("%d", &t); whil...原创 2020-01-12 19:45:02 · 114 阅读 · 0 评论 -
Codeforces Round #613 (Div. 2) A. Mezo Playing Zoma(小思维)
A. Mezo Playing Zoma传送门没见过这么水的题 哈哈哈不过也是有一点小思维的#include<bits/stdc++.h>const int N=100010;char s[N];int main(){ int n; scanf("%d%s",&n,s); printf("%d",n+1);}...原创 2020-01-12 17:53:17 · 175 阅读 · 0 评论 -
Codeforces Round #612 (Div. 2) C - Garland (DP思想)
C - Garland狂开数组两维不行上三维#include "stdio.h"#include "cstdio"#include "iostream"#include "algorithm"#include "map"#include "string.h"#include "cstring"#include "set"using namespace std;int n, p...原创 2020-01-10 11:50:53 · 156 阅读 · 0 评论 -
Codeforces Round #612 (Div. 2) B Hyperset
简单的模拟题意大概是找集合样例:inputCopy3 3SETETSTSEoutputCopy1#include "stdio.h"#include "cstdio"#include "iostream"#include "algorithm"#include "map"#include "string.h"#include "cstring"using name...原创 2020-01-09 22:44:47 · 156 阅读 · 0 评论 -
Codeforces Round #612 (Div. 2) A. Angry Students
A. Angry Students(按要求做)题意 打雪仗 :简单总结就是找最后一个A 后面有多少个P代码实现#include <cstdio>#include <stdio.h>#include <iostream>char s[1005];int main(){ int t; scanf("%d", &t); ...原创 2020-01-09 22:16:48 · 122 阅读 · 0 评论 -
codeforces Good Bye 2019 D
Good Bye 2019 D原创 2020-01-02 23:24:20 · 173 阅读 · 0 评论 -
Codeforce 补题 Good Bye 2019 C
Good Bye 2019 C原创 2020-01-02 23:23:03 · 171 阅读 · 0 评论 -
Codeforce 补题 Good Bye 2019 B 规律题
Good Bye 2019 B 水题原创 2020-01-02 23:18:00 · 139 阅读 · 0 评论 -
codeforce 补题 Good Bye 2019 A 水题(入门博弈)
Good Bye 2019 A原创 2020-01-02 23:17:08 · 157 阅读 · 0 评论 -
Educational Codeforces Round 75 (Rated for Div. 2) A (简单模拟)
http://codeforces.com/contest/1251/problem/A#include "cstdio"#include "cstring"#include "iostream"#include "algorithm"#include "string.h"#include "string"using namespace std;typedef double D...原创 2019-11-01 20:58:51 · 150 阅读 · 0 评论 -
D1. The World Is Just a Programming Task (Easy Version) (字符串匹配)
http://codeforces.com/contest/1248/problem/D1#include<bits/stdc++.h>using namespace std;typedef long long ll;typedef pair<int, int>pi;ll beauty(string &s){ int n = s.size(); ...原创 2019-10-24 17:22:41 · 306 阅读 · 0 评论 -
A. Nearest Interesting Number #570 DIV3 A (水题)
A. Nearest Interesting Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp knows that if the sum of the digits of a number is divis...原创 2019-06-28 20:42:18 · 288 阅读 · 0 评论 -
CF #518 div2 A Birthday
A. Birthdaytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan is collecting coins. There are only原创 2019-06-18 22:19:08 · 241 阅读 · 0 评论 -
Codeforces Round #591 (Div. 2, based on Technocup 2020 Elimination Round 1) B
https://codeforces.com/contest/1241/problem/B #include <bits/stdc++.h>using namespace std;#define LL long long#define LD long double#define SC(t,x) static_cast<t>(x)#define AR(t) ve...原创 2019-10-10 23:14:18 · 121 阅读 · 0 评论 -
Codeforces Round #591 (Div. 2, based on Technocup 2020 Elimination Round 1) A
https://codeforces.com/contest/1241/problem/A#include <bits/stdc++.h>using namespace std;int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int q,n;...原创 2019-10-10 23:06:45 · 206 阅读 · 0 评论 -
CF #486 div3 A. Diverse Team(经典数组操作)
A. Diverse TeamDescription:There are n students in a school class, the ratingof the i-th student on Codehorses is ai. You have to form a team consisting of k students (1≤k≤n) such that the ratings o...原创 2019-06-21 16:21:38 · 242 阅读 · 0 评论 -
codeforces #518 div2 B(最小公倍数+简单数论)
题意:给定正整数 b (b < power(10,18)) 对于 a (1 <= a <= power(10,18)) ,问有多少个符合 lcm(a,b) / a 不同取值的个数题解 : a * b = gcd(a,b) * lcm(a,b) 即求 b 的因数个数。#include<bits/stdc++.h>using namespace std;typ...原创 2019-06-20 17:47:09 · 203 阅读 · 0 评论 -
CF 补题 easy array problem
Problem Description给你一个序列s,长度为n。你需要找到一个长度为k的序列t使得它能被最多次数的从 s 中删除(可不连续且与顺序无关)。你的任务是找到一个序列t。如果有多个可行方案,输出字典序最小的一个序列。Input第一行两个正整数 n 和 k ,分别表示原始序列的长度和要删除序列的长度。第二行 n 个整数表示原始序列。1<=k<=n<=2e5,所有...原创 2019-06-03 21:13:48 · 190 阅读 · 0 评论 -
B. Ehab Is an Odd Person
B. Ehab Is an Odd Persontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou’re given an array原创 2019-06-10 09:54:19 · 246 阅读 · 0 评论 -
A. Repeating Cipher cf div3 529
A. Repeating Ciphertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp loves ciphers. He has invented his own cipher called repeating...原创 2019-06-03 18:58:55 · 189 阅读 · 0 评论 -
codeforces 560 div3 C(贪心)
题意:定义一个字符串是good,如果满足1:长度是偶数2:对每个奇数位置满足s[i] != s[i+1](1-base)问最少删除几个字符可以使原字符串是good贪心#include<bits/stdc++.h> using namespace std; string s;int n;string res;int main(){ cin >> ...原创 2019-06-13 00:52:19 · 162 阅读 · 0 评论 -
Codeforces div3 560 B
题意:给定n场比赛,每场比赛有ai个题目,他第i天最多做i个题目,如果少于i个题目那么就不做,求最多可以做几天题。#include <iostream>#include <algorithm>#include <stdio.h>using namespace std;int a[200010];int n;int main(){ sca...原创 2019-06-13 00:49:27 · 236 阅读 · 0 评论 -
codeforces 560 div3 A. Remainder(模拟)
#include <iostream>#include <cstdio>#include <string>#include <cstring>using namespace std;int main(){ int n, x, y; string s; cin >> n >> x >&...原创 2019-06-13 00:39:20 · 187 阅读 · 0 评论 -
Codefoces 566 div2 B. Plus from Picture(模拟)
B. Plus from Picturetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou have a given picture with size原创 2019-06-13 00:30:45 · 350 阅读 · 0 评论 -
Codeforce div3 C. Letters(二分查找 前缀求和)
C. LettersThere are nn dormitories in Berland State University, they are numbered with integers from 11 to nn. Each dormitory consists of rooms, there are aiai rooms in ii-th dormitory. The rooms in ...原创 2019-06-12 20:53:18 · 394 阅读 · 0 评论 -
CF A. Diverse Strings(字符串水题)
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string is called diverse if it contains consecutive (adjacent) letters of the Latin alpha...原创 2019-06-21 16:48:56 · 232 阅读 · 0 评论 -
Codeforces div2 A. Chunga-Changa
A. Chunga-Changatime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputSoon after the Chunga-Changa island was discovered, it started to acquire ...原创 2019-06-17 20:32:17 · 243 阅读 · 0 评论