上一页 1 2 3 4 5 6 ··· 31 下一页
摘要: Given two rectangles and the coordinates of two points on the diagonals of each rectangle,you have to calculate the area of the intersected part of tw... 阅读全文
posted @ 2015-07-19 10:13 NYNU_ACM 阅读(350) 评论(0) 推荐(0) 编辑
摘要: #include #include class complex{public: friend istream & operator >> (istream & ,complex &); //提取运算符重载友元函数声明。 friend ostream & operator d2) cout|z2|">... 阅读全文
posted @ 2015-06-10 20:10 NYNU_ACM 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 异形卵我们探索宇宙是想了解浩瀚星空的奥秘,我们却很少意识到宇宙深处藏匿的的危险,他们无时无刻不紧盯着我们的地球。如果外星人拜访我们,结果可能与哥伦布当年踏足美洲大陆不会有什么两样,这是历史,也是现实。在ZDM-777星球上发现的休眠异形卵,其外表与常见的卵不同,表面被一层石墨覆盖。当人走进时,那层石... 阅读全文
posted @ 2015-04-16 20:35 NYNU_ACM 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std ; 3 int main() 4 { 5 int n ; 6 while(cin >> n) { 7 int sum = 1 2 #include 3 using namespace ... 阅读全文
posted @ 2015-03-19 21:02 NYNU_ACM 阅读(1474) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std ;int main(){ int n; while(cin>>n) { int score, score_sum = 0; for(int i=0;i>score ; ... 阅读全文
posted @ 2015-03-19 20:41 NYNU_ACM 阅读(9469) 评论(1) 推荐(0) 编辑
摘要: #include using namespace std;int main(){ int x,y; bool prime; for(x=1;x<200;x++) { for(y=x+1;y<=x+8;y++) { prime=false; if(x*y==6*(x+y))... 阅读全文
posted @ 2015-03-19 20:25 NYNU_ACM 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 箱子里有红,黄,蓝,白,黑五种颜色玻璃球若干,每次任意拿出三个球,问拿出三种不同颜色玻璃球的可能取法,请输出每种排列的情况。注解:利用枚举法定义五种情况,“enum color {red,yellow,blue,white,black};”,定义四个整形变量“int i,j,k,m=0;”,依次从i... 阅读全文
posted @ 2015-03-17 20:31 NYNU_ACM 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 描述假设你有一个各位数字互不相同的四位数,把所有的数字从大到小排序后得到a,从小到大后得到b,然后用a-b替换原来这个数,并且继续操作。例如,从1234出发,依次可以得到4321-1234=3087、8730-378=8352、8532-2358=6174,又回到了它自己!现在要你写一个程序来判断一... 阅读全文
posted @ 2015-03-13 20:20 NYNU_ACM 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 描述求A+B是否与C相等。输入T组测试数据。 每组数据中有三个实数A,B,C(-10000.0 double sum (double A,double B) { double d; d=A+B; return d; } int main() { int T; double A,B,C,D,F; sc... 阅读全文
posted @ 2015-03-11 20:09 NYNU_ACM 阅读(125) 评论(0) 推荐(0) 编辑
摘要: /*栈的实现只需要一个一维数组和一个指向栈顶的变量top就好了,通过top来对栈进行插入和删除操作,下面的代码是计算字符串是否是回文*/#include #include int main(){ char a[101],s[101]; int i,len,mid,next,top; ... 阅读全文
posted @ 2015-02-26 16:35 NYNU_ACM 阅读(177) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 31 下一页