Codeforces 145E. Lucky Queries 线段树
摘要:题目链接; 题目描述: Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky
阅读全文
posted @
2018-03-30 13:40
Kevin_Zzzzz
阅读(318)
推荐(0)
Codeforces 103B. Cthulhu 并查集运用
摘要:题目链接; 题面: ...Once upon a time a man came to the sea. The sea was stormy and dark. The man started to call for the little mermaid to appear but alas, h
阅读全文
posted @
2018-03-30 13:19
Kevin_Zzzzz
阅读(345)
推荐(0)
Codeforces 792C. Divide by Three 贪心+分类讨论
摘要:题意:给一个数字字符串,让你删除尽可能少的数位,使得这个数能够被3整除,并且不能有前导0存在。 思路:所有数位加起来%3得到的值mod,那么就有三种情况 mod==0:直接输出 mod==1:要么删除一个数位%3=1的数,要么删除两个数位%3=2的数 mod==2:要么删除一个数位%3=2的数,要么
阅读全文
posted @
2017-10-26 13:43
Kevin_Zzzzz
阅读(325)
推荐(0)
Codeforces 699C. Vacations
摘要:C. Vacations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Vacations time limit per
阅读全文
posted @
2017-10-22 20:27
Kevin_Zzzzz
阅读(366)
推荐(0)
Codeforces 844A
摘要:#include #include bool cnt[30]; int main() { char t; int ans=0; //重复字符数 int num=0; //字符长度 memset(cnt,false,sizeof(cnt)); while(1) { t=getchar(); if(t=='\n'...
阅读全文
posted @
2017-08-31 23:40
Kevin_Zzzzz
阅读(138)
推荐(0)