摘要: 叉积(用坐标)能够判断边b是在边a的顺时针方向还是逆时针方向代码如下: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int n, i; 7 int coordinate[1000][2]; 8 int real( int coordinate[][2], int i ); 9 10 while( scanf( "%d", &n ), n )11 {12 13 for( i = 0; i < n; i ++ )//逆时针读入坐标14 {15... 阅读全文
posted @ 2013-03-23 10:26 hacker_hzh 阅读(120) 评论(0) 推荐(0)
摘要: 坑爹啊 竟然不是24小时制 巨坑。。。。。代码如下: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 __int64 N, a, b, c, x, y, z, time1, time2, time3; 7 __int64 display( __int64 x ); 8 9 scanf( "%I64d", &N );10 11 while( N -- )12 {13 scanf( "%I64d:%I64d:%I64d %I64d:%I64d:%I64d&q 阅读全文
posted @ 2013-03-23 09:51 hacker_hzh 阅读(128) 评论(0) 推荐(0)
摘要: 哥的第一道背包啊啊啊啊!!!爽啊啊啊啊啊!!!代码如下: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 int main() 6 { 7 int n, m, v[104], w[104], i, j, x[100000]; 8 9 while( scanf( "%d", &n) != EOF )10 {11 for( i = 0; i < n; i ++ )12 {13 scanf( "%d%d", &w[ 阅读全文
posted @ 2013-03-21 21:48 hacker_hzh 阅读(179) 评论(0) 推荐(0)
摘要: 哈哈 就是喜欢水题。。。签到题。。。 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int C, N, number[16], i, j, t, sum, now; 7 8 scanf( "%d", &C ); 9 10 while( C -- )11 {12 scanf( "%d", &N );13 14 for( i = 0; i < N; i ++ )15 {16 scanf( "%d", &n 阅读全文
posted @ 2013-03-21 21:35 hacker_hzh 阅读(129) 评论(0) 推荐(0)
摘要: 又到星期四,我擦啊,明天就星期五了,貌似这周又是什么没学到啊啊。。。。知识增长的速率太慢啊啊啊啊啊啊!!!加油!!! 阅读全文
posted @ 2013-03-21 21:13 hacker_hzh 阅读(95) 评论(0) 推荐(0)
摘要: 签到题。。。。话说开始的时候while的括号没打回来 看了好半天啊啊 坑爹啊啊啊啊#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>int main(){ int N, M, i, j, a[23][23], b[23][23], t, k; int _evalue( int x, int y ); while( scanf( "%d%d", &N, &M ) ) { if( N == 0 || M == 0 ) b 阅读全文
posted @ 2013-03-21 01:23 hacker_hzh 阅读(160) 评论(0) 推荐(0)
摘要: 今天,不知怎么的我突然怕了,以前不那么在乎的东西,如今感觉要失去的时候突然很害怕。。。。。要加油啊!!! 阅读全文
posted @ 2013-03-18 23:09 hacker_hzh 阅读(105) 评论(0) 推荐(0)
摘要: 说实话第一眼不知道怎么做 然后百度下。。。看到了母函数三个字。。。。果断A了代码如下: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <math.h> 4 #include <string.h> 5 6 int main() 7 { 8 int prime[150], i, j, k, m, t, e, a[200], b[200], c[200], n; 9 int judge( int x );10 11 for( t = 0, j = 2; j <= 150; j ++ ) 阅读全文
posted @ 2013-03-17 21:55 hacker_hzh 阅读(133) 评论(0) 推荐(0)
摘要: 当 n % ( m + 1 ) == 0 的时候 如果第一个每次捐的是X(不确定 但肯定 1<x<m)只要第二人这时候捐 m + 1 - x就能最后胜出如果 n % ( m + 1 ) == c 那么只要第一个人第一次捐c 然后按照上面所述捐款就能获得最后胜利代码如下: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int c, n, m; 7 8 scanf( "%d", &c ); 9 10 while( c -- )11 {12 scanf( 阅读全文
posted @ 2013-03-17 21:22 hacker_hzh 阅读(106) 评论(0) 推荐(0)
摘要: 超级水题。。。排序后直接A了代码如下: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main() 5 { 6 int c, n, m, p[1010], h[1010], i, j, t; 7 double sum; 8 9 scanf( "%d", &c );10 11 while( c -- )12 {13 scanf( "%d%d", &n, &m );14 15 for ( i = 0; i < m; i ++ )16 {17 ... 阅读全文
posted @ 2013-03-17 21:06 hacker_hzh 阅读(148) 评论(0) 推荐(0)