上一页 1 ··· 14 15 16 17 18
2012年8月21日

UVA579-时钟的指示

摘要: #include #include using namespace std;int main (){ int h, m; double a1, a2,angle; char c; while(cin>>h>>c>>m) { if(!h&&!m)break; if(h==12)h = 0; a1 = (h+m/60.0)*30.0; a2 = m*6.0; angle = a2 - a1; //cout"; ... 阅读全文
posted @ 2012-08-21 10:21 Primo... 阅读(99) 评论(0) 推荐(0)

UVA755- 487-3279

摘要: 对于这个题,花费的时间也不少。错误一;由于考虑不全1400U--4N712---X2-KN-U-75VR-J37G--385W-0Y6-V85W-0Y6-V85W-0Y6-V--N-6AV4-NK--XL----F-PO--B-0-P-10167P7--R8YME-NP-U-1O6W-----1X-KFK87--LYFX63K-N-3-73G---ELH--2RD-6-IJ-YP2--SJ9G9P2--SJ9G9O-1----2287-2-DC-C1L-3V7963V68U-66X52MU-66X52M-8-16F5TG---YN-32E5-K---YN-32E5-K4--KDJ-PV24-- 阅读全文
posted @ 2012-08-21 10:21 Primo... 阅读(168) 评论(0) 推荐(0)

UVA673-括号平衡

摘要: #include #include using namespace std;struct point{ char ch; point *next;};int main (){ int n, len, flag = 0, flag2 = 0; string s; cin>>n; cin.get(); while(n--) { point *p, *q, *head, *bridge; getline(cin,s); if(!s.size()) { coutch = s[i... 阅读全文
posted @ 2012-08-21 10:21 Primo... 阅读(114) 评论(0) 推荐(0)

UVA644-立即可解码性

摘要: #include #include #include using namespace std;int com(const void *a , const void *b){ return strlen(((char *)a))- strlen(((char *)b));}int main (){ char b[9][15]; char c; int num = 0; while(1) { int i = 0, j = 0; num++; while(c = cin.get()) { ... 阅读全文
posted @ 2012-08-21 10:21 Primo... 阅读(108) 评论(0) 推荐(0)

UVA846-步数

摘要: #include using namespace std;int main (){ int m, n; int num; cin>>num; while(num--) { cin>>m>>n; int dis, step = 0; dis = n - m; if(dis == 0) { cout<<0<<endl; continue; } int k = 0; for(k = 0; k*k <= dis; k+... 阅读全文
posted @ 2012-08-21 10:20 Primo... 阅读(96) 评论(0) 推荐(0)

UVA1122-clock

摘要: 此题的难点是表盘的规律,时针和分针相遇的时刻是60*hour/11,还有,常疏忽的地方是第一行和最后一行的两句话、#include #include using namespace std;int main (){ cout>a>>b>>c>>d) { int n = c - a; if(n==0&&d<b) n+=11; if(n<0)n += 11; n += 13; if(((60*(a)/11))<b)n -= 1; if(c==12)n-=1; else if(d<((60*... 阅读全文
posted @ 2012-08-21 10:20 Primo... 阅读(137) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18