水题----根据O出现次数判断分数】的更多相关文章

There is an objective test result such as \OOXXOXXOOO". An `O' means a correct answer of a problemand an `X' means a wrong answer. The score of each problem of this test is calculated by itself andits just previous consecutive `O's only when the answ…
题目传送门 /* 水题:三个字符串判断每个是否有相应的元音字母,YES/NO 下午网速巨慢:( */ #include <cstdio> #include <cstring> #include <string> #include <iostream> #include <algorithm> #include <cmath> using namespace std; ; const int INF = 0x3f3f3f3f; ]; i…
遮挡判断(shadow) Time Limit: 20 Sec  Memory Limit: 256 MB 题目连接 http://acm.uestc.edu.cn/#/problem/show/26 Description 在一个广场上有一排沿着东西方向排列的石柱子,阳光从东边以一定的倾角射来(平行光).有的柱子可能被在他东边的高大的柱子的影子给完全遮挡住了.现在你要解决的问题是求出有多少柱子是没有被完全遮挡住的. 假设每个石柱子是一根细棒,而且都垂直于地面摆放. Input 输入包含多组数据…
下面是别人解题报告的链接,很详细,写的很好 http://blog.csdn.net/chl_3205/article/details/8520597 下面贴我的代码 #include <cstdio> struct point { int x,y; } p[]; bool checkDir(point p0,point p1,point p2) { ) return true; else return false; } int main() { // freopen("in.cpp…
再遇攻击 Time Limit: 1000 MS    Memory Limit: 65536 K Total Submit: 253(37 users)   Total Accepted: 56(29 users)       Rating:         Special Judge: No Description Dota中英雄技能攻击会有一个范围,现在释放一个技能给出他的攻击范围和目标英雄的位置,问是否能攻击到.攻击范围保证是一个多边型. Input 有多组测试数据 第一行输入1个整数n…
题意:给定 n 条边,判断是不是树. 析:水题,判断是不是树,首先是有没有环,这个可以用并查集来判断,然后就是边数等于顶点数减1. 代码如下: #include <bits/stdc++.h> using namespace std; const int maxn =1000 + 5; int p[maxn]; int Find(int x){ return x == p[x] ? x : p[x] = Find(p[x]); } int main(){ int n, m, x, y; cin…
题目标题:前缀判断 如下的代码判断 needle_start指向的串是否为haystack_start指向的串的前缀,如不是,则返回NULL. 比如:"abcd1234" 就包含了 "abc" 为前缀 char* prefix(char* haystack_start, char* needle_start) { char* haystack = haystack_start; char* needle = needle_start; while(*haystack…
题意:       给你一个串,问你这个串是不是关于某个字母对称的,这个串是一个首位相接的圆. 思路:       水题,直接枚举每一个为对称点试一下就行了,不解释了. #include<stdio.h> #include<string.h> char str[110]; int main () { while(~scanf("%s" ,str) && strcmp(str ,"#")) { int len = strlen(…
Codeforces Round #258 (Div. 2) Predict Outcome of the Game C. Predict Outcome of the Game time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output There are n games in a football tournament. Three…
UVa 1339 题目大意:给定两个长度相同且不超过100个字符的字符串,判断能否把其中一个字符串重排后,然后对26个字母一一做一个映射,使得两个字符串相同 解题思路:字母可以重排,那么次序便不重要,可以分别统计两个字符串中的各个字母出现的次数,得到两个cnt[26]数组, 又由于可以进行映射,则可以直接对两个数组进行排序后判断是否相等(相当于原来相等的值的两个地方做映射) /* UVa 1339 Ancient Cipher --- 水题 */ #include <cstdio> #incl…