CF535A Tavas and Nafas 题解】的更多相关文章

Content 请输出整数 \(s\) 的英文写法. 数据范围:\(0\leqslant s\leqslant 99\). Solution 直接对应打表即可. 当 \(0\leqslant s\leqslant 19\),直接特判对应输出即可. 当 \(20\leqslant s\leqslant 99\),碰到整十数就先输出对应的英文单词,如果后面还有数,先加上一个连字符,再输出个位上的数字. 建议做完这题目之后再去做做 P1617. Code const string num[11] =…
A. Tavas and Nafas Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/535/problem/A Description Today Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas. His phone operating syste…
 Tavas and Nafas time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Today Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas. His phone operating…
题目传送门 /* 很简单的水题,晚上累了,刷刷水题开心一下:) */ #include <bits/stdc++.h> using namespace std; ][] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight",…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 模拟题 [代码] #include <bits/stdc++.h> using namespace std; map <int,string> mmap; int main(){ #ifdef LOCAL_DEFINE freopen("rush_in.txt", "rt", stdin); #endif mmap[0] = "zero"; mmap[1]…
题意简述 有一个空着的长度为\(n\)的字符串\(ans\),再给出一个长度为\(m\)的序列\(a\),现要在序列中每个元素\(a_i\)的位置开始都规定必须为一个给定的字符串\(s\).问字符串\(ans\)的可能种类. 解法 主要考虑有可能\(a_i\)之间互相冲突导致直接输出\(0\),于是我们需要快速判断当前字符串\(s\)的首与尾是否匹配.显然有两种可行解法,第一种是KMP,第二种是玄学的字符串哈希.但是写这篇题解的蒟蒻不想打KMP,于是就写了一个哈希. 这里的哈希其实只用单哈希即可…
A. Tavas and Nafas time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Today Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas. His phone operati…
这场比赛并没有打现场,昨天晚上做了ABCD四道题,今天做掉了E题 以前还没有过切完一场比赛的所有题呢~爽~ A. Tavas and Nafas   Today Tavas got his test result as an integer score and he wants to share it with his girlfriend, Nafas. His phone operating system is Tavdroid, and its keyboard doesn't have…
Tavas and Karafs time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Karafs is some kind of vegetable in shape of an 1 × h rectangle. Tavaspolis people love Karafs and they use Karafs in almos…
题目链接: http://codeforces.com/problemset/problem/535/D D. Tavas and Malekas time limit per test2 secondsmemory limit per test256 megabytes 问题描述 Tavas is a strange creature. Usually "zzz" comes out of people's mouth while sleeping, but string s of…