水题:UVa489-Hangman Judge】的更多相关文章

Hangman Judge Time limit 3000 ms Description In Hangman Judge, you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are the same as the classic game of hangma…
题目链接:https://vjudge.net/problem/UVA-489 题意:给出两行字符串,第一行是标准答案,第二行是玩家猜的串.玩家每次猜一个,猜对一个,标准答案中所有该字符都算被猜到.猜错的次数不能到达七次.多次因同一个字符猜错算猜错一次(这个条件没有用). 猜对, 没猜对且错了七次, 没猜对但还没错到七次 分别输出 You win. You lose. You chickened out. 题解:模拟,莫名奇妙wa了一个小时.各种修改. 以至于找到了一组数据,oj检测不出来,手算…
题意:就是给出一个字符串,让你去一个一个猜测,相同字母算一次,如果是之前猜过的也算错,如果你在错7次前猜对就算你赢,文章中是LRJ的例题代码. #include<stdio.h> #include<string.h> #define maxn 100 int left, chance; char s[maxn], s2[maxn]; int win, lose; void guess(char ch) { int bad = 1; for(int i = 0; i < str…
分析:水题. #include<iostream> using namespace std; #define N 5050 char a[N],b[N],tmp[N]; void Read(char p[]) { getchar(); gets(tmp); while(gets(tmp)) { if(strcmp(tmp,"END")==0) break; if(strlen(tmp)!=0) strcat(p,tmp); strcat(p,"\n");…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 水题. 中间就赢了算赢.(重复说,算错 [代码] #include <bits/stdc++.h> using namespace std; int _round; string s1,s2; int cnt[300]; int ok(string s){ int cur = 0; for (int i = 0;i < (int)s.size();i++){ int temp = s[i]-'a'; if (cnt[te…
折线分割平面 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13355    Accepted Submission(s): 9247 Problem Description 我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目.比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分…
一只小蜜蜂... Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Submission(s): Problem Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行.请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数. 其中,蜂房的结构如下所示. Input 输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个…
超级楼梯 Time Limit: / MS (Java/Others) Memory Limit: / K (Java/Others) Total Submission(s): Accepted Submission(s): Problem Description 有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input 输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(<=M<=),表示楼梯的级数. Outpu…
做水题的感觉真好系列 HDU 2084 数塔 1: 12: 1 23: 1 2 34: 1 2 3 45: 1 2 3 4 5 dp[i][j]第i行第j个数取得的最大值dp[i][j] = max(dp[i-1][j-1], dp[i-1][j]) + a[i][j]. 代码: /********************************************************* Problem : 2084 ( 数塔 ) Judge Status : Accepted RunI…
转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud Hiking Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 724    Accepted Submission(s): 384Special Judge Problem Description There are …