码迷,mamicode.com
首页 >  
搜索关键字:scanf    ( 10388个结果
[博弈]受限Nim游戏
题目大意:有N(1 2 #include 3 using namespace std; 4 long long ans=0; 5 int T; 6 int n; 7 int main() 8 { 9 scanf("%d",&T);10 while(T--)11 {12 ...
分类:其他好文   时间:2014-08-16 17:02:30    阅读次数:191
03-3. 12-24小时制(15)
编写一个程序,要求用户输入24小时制的时间,然后显示12小时制的时间。输入格式:输入在一行中给出带有中间的“:”符号(半角的冒号)的24小时制的时间,如12:34表示12点34分。当小时或分钟数小于10时,均没有前导的零,如5:6表示5点零6分。提示:在scanf的格式字符串中加入“:”,让scan...
分类:其他好文   时间:2014-08-16 16:23:40    阅读次数:135
数论 Number Transformation HDU4952
已知n,k,操作k次,每次操作求大于n且能被次数i整除的最小的数 已知x*i,所以(i+1)*y>=x*i,y>=x-[x/(i+1)],当x #include int main() { long long n,k; long long i; int time=0; while(scanf("%I64d%I64d",&n,&k)!=-1) { ...
分类:其他好文   时间:2014-08-16 15:07:40    阅读次数:162
题目590-相同的和-nyoj20140816
#includeint main(){int n,a,b[1010],i,j,cnt,sum;while(scanf("%d%d",&n,&a)!=EOF){cnt=0;for(i=0;i//#include int main(){ int m,n; int a[100]; int sum,k,i,...
分类:其他好文   时间:2014-08-16 11:06:50    阅读次数:182
题目588-money-nyoj20140816
#include int main(){ int m; scanf("%d",&m); while(m--) { int money,wujiao,erjiao,yijiao; int num; num=0; scanf("%d",&money); for(wujiao=0;wujiao<=mon....
分类:其他好文   时间:2014-08-16 10:57:50    阅读次数:220
hdu 4941 map的应用+离散
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int main() 8 { 9 int T,n,m,k,a,b,c,q,cas=1;10 scanf("%d",&T);11 w...
分类:其他好文   时间:2014-08-16 09:39:10    阅读次数:190
hdu 1251 统计难题 (map水过)
# include # include # include # include # include using namespace std; int main() { char a; string x; mapq; while(true) { scanf("%c",&a); if(a=='\n') ...
分类:其他好文   时间:2014-08-15 22:34:19    阅读次数:217
hdu--1866--矩形重叠<扫描法,自定义>
擦 终于做出题了........... 这2天 没心思啊 烦 烦 ...这题 虽然不难 但还是有地方要注意可能会有空格存在 所以不能用cin scanf去读 一定要用getline gets来读取而且 可能会有除了题目中这些 ( ) , +这4个符号以为的字符 所以判断的时候 用!(ch>='0' ...
分类:其他好文   时间:2014-08-15 20:53:49    阅读次数:218
zoj1857Fire Station最短路
乱搞题。就是输入有点问题,我开始用的 scanf("%d%d%d",&a,&b,&c) !=EOF 然后就妥妥的秒wa 但是poj 莫名奇妙的挂了,这时Gxwar 告诉我zoj我过不了,然后我就过不了。。。可是改了下输入就过了。真是神奇。#include #include #include #i.....
分类:其他好文   时间:2014-08-15 17:29:39    阅读次数:205
最长上升 DP2
// 源程序2 DP#include int n,ans, a[1001],b[1001];int main(){ int i,j; scanf("%d",&n); for(i=1;ia[j]&&b[j]+1>b[i]) b[i]=b[j]+1; ans=1; for(i=1;i<=n;i++) i...
分类:其他好文   时间:2014-08-15 12:27:38    阅读次数:170
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!