Codeforces
文章平均质量分 75
OI李想
曾是一只有理想的OIer
展开
-
[Updating]ICM Technex 2017 and Codeforces Round #400 (Div. 1 + Div. 2, combined)
Problem A-A Serial Killer模拟//Author: Lixiang#include#includestruct A_Serial_Killer{ char now[2][11]; int N; void init(){ scanf("%s%s",now[0],now[1]); scanf("%d",&N); } bool cmp(char a[原创 2017-02-24 11:54:27 · 613 阅读 · 0 评论 -
[占坑]Tinkoff Challenge - Final Round (Codeforces Round #414, rated, Div. 1 + Div. 2) 解题报告
正在改,占坑原创 2017-05-15 15:37:18 · 385 阅读 · 1 评论 -
[Updating] Playrix Codescapes Cup (Codeforces Round #413, rated, Div. 1 + Div. 2) 解题报告
Problem A - Carrot Cakes//Author: Lixiang#include<stdio.h>struct A{ int n,t,k,d; void init(){ scanf("%d%d%d%d",&n,&t,&k,&d); } void work(){ int a=n/k; if(a*k<n原创 2017-05-15 15:35:08 · 314 阅读 · 0 评论 -
[占坑]Codeforces Round #412 解题报告
太晚,没做,占坑,待更原创 2017-05-15 15:29:14 · 200 阅读 · 0 评论 -
[Updating] Codeforces Round #411 解题报告
805A - Fake NP除非L=R,否则2必定为答案之一//Author: Lixiang#include<stdio.h>struct A{ int a,b; void init(){ scanf("%d%d",&a,&b); } void work(){ if(a==b)printf("%d\n",a); e原创 2017-05-15 15:27:38 · 204 阅读 · 0 评论 -
[Updating] Educational Codeforces Round 20 解题报告
Problem A - Maximal Binary Matrix简单构造就行了//Author: Lixiang#include<stdio.h>const int maxn=101;struct A{ int a[maxn][maxn]; int N,K; void init(){ scanf("%d%d",&N,&K); } voi原创 2017-05-15 15:16:43 · 206 阅读 · 0 评论 -
[Updating] Tinkoff Challenge - Elimination Round 解题报告
Problem A- Oleg and shares判断AiA_i是否满足Ai≡C(modK){A}_{i}\equiv C (mod K)其中C为常数//Author: Lixiang#include<stdio.h>#include<algorithm>const int maxn=100001;struct A{ int a[maxn]; int Min,N,K;原创 2017-05-15 14:54:44 · 265 阅读 · 0 评论 -
Codeforces Round #409 解题报告
801A - Vicious Keyboard 只能说难受,被systest卡了。 题意:给一串由V ,K字母组成的字符串,任意改变一个字符(也可不改变)使得其中VK子串数量最大 Solution: 找VK数量,再找3连K,或3连V,或开头是KKV,或结尾VVK的,注意N==2要特判//Author: Lixiang#include<stdio.h>#include<string.h>c原创 2017-04-17 08:19:59 · 380 阅读 · 0 评论 -
Codeforces Round #407 (Div. 2) 解题报告
Problem A-Anastasia and pebbles 简单贪心//Author: Lixiang#include<stdio.h>#include<algorithm>using namespace std;const int maxn=100001;int floordiv(double a,double b){ return (int)a/b;}struct P原创 2017-03-30 10:35:40 · 370 阅读 · 0 评论 -
[Updating] Codeforces Round #406 (Div. 2) 解题报告
A-The Monster 扩展欧几里得求同余方程ax≡d−b(modc)ax\equiv d-b(mod c)最小正整数解满足条件x∗a+b≥dx*a+b\geq d成立#include<stdio.h>inline int abs(int x){ return x>0?x:-x;}struct The_Monster{ int a,b,c,p,d,x,y; int原创 2017-03-24 14:42:15 · 430 阅读 · 0 评论 -
[Updating]Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals)解题报告
A-Andryusha and Socks模拟一遍即可//Author: Lixiang#includeconst int maxn=200001;inline int max(int a,int b){ return a>b?a:b;}struct Andryusha_and_Socks{ bool hash[maxn]; int N,ans; void init(){原创 2017-03-06 08:13:44 · 326 阅读 · 0 评论 -
[Updating]Codeforces Round #402 (Div. 1)解题报告
A-String Game简单的二分+模拟//Author: Lixiang#include#includeconst int maxn=200001;struct String_Game{ char A[maxn],B[maxn],c[maxn]; int pos[maxn],N,n; void init(){ scanf("%s%s",&A,&B); N=strl原创 2017-03-06 08:04:12 · 311 阅读 · 0 评论 -
[Updating] Codeforces Round #404 (Div. 2) 解题报告
A-Anton and Polyhedrons 大水题//Author: Lixiang#include<stdio.h>struct Anton_and_Polyhedrons{ char s[100]; void init(){ int ans=0,N; scanf("%d",&N); while(N--){原创 2017-03-16 08:16:01 · 272 阅读 · 0 评论 -
Codeforces Round #398 (Div. 2)解题报告
Problem A- Snacktower模拟,贪心,每次找最大的//Author: Lixiang#include#include#includeusing namespace std;const int maxn=100001;struct Snacktower{ int a[maxn],b[maxn],N; void init(){ scanf("%d",&N原创 2017-02-20 15:50:23 · 412 阅读 · 0 评论 -
Codeforces Round #401 (div. 2)解题报告
Problem A-Shell Game找规律 6个一组//Author: Lixiang#includestruct Shell_Game{ int N,X; void init(){ scanf("%d%d",&N,&X); } int getans(){ switch(N%6){ case 0: if(X==0)return 0; if(X=原创 2017-02-25 16:17:08 · 429 阅读 · 0 评论 -
Codeforces Round #422 (Div. 2) 解题报告
A. I’m bored with life//Author: Lixiang#include<stdio.h>struct A{ int A,B; void init(){ scanf("%d%d",&A,&B); } void work(){ if(A>B){ int t=A; A原创 2017-07-17 23:12:50 · 310 阅读 · 0 评论