sicily
文章平均质量分 50
Baamian
Ordinary Yet Unique.
展开
-
1014[Specialized Four-Dig]
DescriptionFind and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base原创 2013-10-10 16:27:44 · 768 阅读 · 0 评论 -
1815[Distance]
求两个坐标点的距离- -主要是输出保证有两个小数点~ #include#include#include using namespace std;int main(){ int n; double x1, y1 ,x2, y2; double y; cin >> n; while( n-- ) { cin >> x1 >> y1 >> x2 >> y2;原创 2013-11-07 21:18:59 · 443 阅读 · 0 评论 -
1817[校园歌手大赛]
Description校歌手大奖赛中每个评委会给每个参赛选手打分,请用类描述每个选手的被评委的评分。选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分。 Input输入数据有多组,第一行为数据组数T每组数据第一行两个正整数 n m (3 接下来 n 行,每行 m 个正整数。每行表示一个评委给 m 个选手的分数,分数为[0,10原创 2013-11-14 14:33:29 · 1578 阅读 · 0 评论 -
1818[成绩转换]
Description保存学生姓名和成绩,然后通过姓名查询该学生的成绩等级。输入为百分制的成绩,将其转换成对应的等级,具体转换规则如下:90~100 为 A;80~89 为 B;70~79 为 C;60~69 为 D;0~59 为 E;Input输入有多组数据。第一行为数据组数T。对于每组数据,第一行包含两个整数 n(1注意: 数原创 2013-11-14 16:10:04 · 555 阅读 · 0 评论 -
1087[A funny game]
/*当n==1 || n==2时,明显先手必胜。当n==3时,明显先手必败。由于每次只可取1或2个,而取2个时,2个必须相邻,推断有:当n>3时,若n为偶数,先手无论如何取,后手可在先手对称的位置上取同等数量,于是先手必败。若n为奇数,先手取1个时,后手可在先手对称的位置上取2个,之后无论先手如何取,后手都可在先手对称的位置上取同等数量,先手必败。如果先手一开始取2个时,后转载 2013-12-01 17:08:03 · 503 阅读 · 0 评论 -
1070[Hansel and Grethel]
题目鬼长的。意思就是给出两已知点坐标,还有目的坐标与这两点坐标的角度值,求出目的坐标。一下想到的是坐标系上两线交叉的位置即目的坐标但是再求斜率的时候遇上了麻烦- -于是就找了一份代码研究~下面放代码,然后再解释:#include #include #define PI acos(-1.0) //圆周率int main(){ int t; double x1,原创 2013-12-01 16:55:46 · 653 阅读 · 0 评论 -
1145[校门外的树]
做过几次了~#includeusing namespace std;int main(){ int a[10001] = {0}; int m, n; int begin, end; int i; int count = 0; cin >> m >> n; for( i = 0; i <= m; i++ ) a[i原创 2013-12-04 16:07:43 · 561 阅读 · 0 评论 -
1232[eletrical outlets]
主要是理解题目算法是后面的数字之和减去数的个数再加上1.#includeusing namespace std;int main(){ int n, m, i, sum; int a; cin >> n; if( n>=1 && n<=20 ) { while( n-- ) { cin >> m; sum = 0; for ( i =原创 2014-02-26 14:37:24 · 620 阅读 · 0 评论 -
1388[quicksum]
键盘输入法害死人 - -fine还是比较简单的题目。通过strlen()函数知道字符串的长度然后就好计算了。include#includeusing namespace std;int main(){ char a[256]; while( cin.getline( a, 256 ) ) { if(a[0] == '#')原创 2014-03-03 16:45:01 · 523 阅读 · 0 评论 -
1798[Bob and Alice]
肚子疼还写了两水题~哼 程序媛好苦逼TAT//这题略捞- -//解法是说一定要走完所有格子的情况//格子总是是单数就一定是Bob赢,双数就一定是Alice赢//其实如果玩家动下脑筋谁赢还是不一定的#includeusing namespace std;int main(){ int n; while( cin >> n && n != 0 ) { if( n原创 2013-11-07 16:16:58 · 628 阅读 · 0 评论 -
1795[Table Tennis]
这一题题目不难看懂,也好写今天肚子疼TAT#include#includeusing namespace std;int big( int x, int y ){ if( (x-30) * (x-30) + (y-30) * (y-30) < 20 * 20 ) return 1; else return 0;}int middle( int x, int y原创 2013-11-07 15:53:57 · 738 阅读 · 0 评论 -
1007[To and Fro]
DescriptionMo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra ran原创 2013-10-10 15:27:38 · 706 阅读 · 0 评论 -
1024[MJ, Nowhere to Hide]
DescriptionOn BBS, there is a familiar term called MJ (short for MaJia), which means another BBS ID of one person besides his/her main ID.These days, a lot of ACMers pour water on the ACMICPC Bo原创 2013-10-17 14:03:56 · 652 阅读 · 0 评论 -
1036[Crypto Columns]
DescriptionThe columnar encryption scheme scrambles the letters in a message (or plaintext) using a keyword as illustrated in the following example: Suppose BATBOY is the keyword and our message i原创 2013-10-17 15:07:10 · 787 阅读 · 0 评论 -
1147[谁拿了最多奖学金]
题目懒得复制了意思就是根据要求谁拿了最多的奖学金。思路是给学生建立一个struct,然后进行那些麻烦判断。直接放代码#include#include#includeusing namespace std;struct Student{ string name; int end; int cla; char moni; char west; in原创 2013-10-17 15:52:17 · 948 阅读 · 0 评论 -
1157[The hardest problem]
本来看起来好简单的题目但是总是wrong answer!好恼火!下面是对的#includeusing namespace std;int main(){ int n, num, max; while( cin >> n && n ) { cin >> max; for(int i = 1; i < n; i++) { cin >>num;原创 2013-10-17 16:04:15 · 687 阅读 · 0 评论 -
1293[3n+1数链问题]
Description在计算机科学上,有很多类问题是无法解决的,我们称之为不可解决问题。然而,在很多情况我们并不知道哪一类问题可以解决,那一类问题不可解决。现在我们就有这样一个问题,问题如下:1. 输入一个正整数n;2. 把n显示出来;3. 如果n=1则结束;4. 如果n是奇数则n变为3n+1 ,否则n变为n/2;5.原创 2013-10-17 16:34:15 · 905 阅读 · 0 评论 -
1510[Mispelling]
DescriptionMisspelling is an art form that students seem to excel at. Write a program that removes the n th character from an input string.*****************************************************原创 2013-10-17 16:52:07 · 761 阅读 · 0 评论 -
0002[虚构函数]
abstract.h#ifndef abstract_H#define abstract_H#include using std::string;class System {public: virtual string info() = 0; virtual ~System() {}};class Activity {protected: System* syst原创 2014-04-16 15:53:58 · 717 阅读 · 0 评论