From b57abe9a0fe4b88a81e4eb095ea7f544e2c66427 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Thu, 28 Apr 2016 09:00:04 +0800 Subject: [PATCH 1/2] Create 1229.c --- QUSTOJ/1229.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 QUSTOJ/1229.c diff --git a/QUSTOJ/1229.c b/QUSTOJ/1229.c new file mode 100644 index 0000000..60dd055 --- /dev/null +++ b/QUSTOJ/1229.c @@ -0,0 +1,74 @@ +#include +#include +#include + +int map[110][110]; +int maxofmap; +int findinmap(int l,int h,int max) +{ + int i,j,p,q; + int state=-1; + int maxans; + int tmp; + for(i=0;imaxans) + { + maxans=tmp; + } + } + } + return maxans; +} +void deal(int max) +{ + int l,h,tmp; + for(l=1;l<=max;l++) + { + for(h=1;hmaxofmap) + { + maxofmap=tmp; + } + } + } + printf("%d\n",maxofmap); +} + + +int main() +{ + int all,n,i,j; + scanf("%d",&all); + for(;all>0;all--) + { + scanf("%d",&n); + memset(map,0,sizeof(int)*110*110); + for(i=1;i<=n;i++) + { + for(j=1;j<=n;j++) + { + scanf("%d",&map[i][j]); + } + } + maxofmap=map[1][1]; + deal(n); + } + return 0; +} From 5c0c3f41c05d002842f96e6767f807cb06542eb4 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Thu, 28 Apr 2016 09:07:17 +0800 Subject: [PATCH 2/2] Create 1231.cpp --- QUSTOJ/1231.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 QUSTOJ/1231.cpp diff --git a/QUSTOJ/1231.cpp b/QUSTOJ/1231.cpp new file mode 100644 index 0000000..4fb267c --- /dev/null +++ b/QUSTOJ/1231.cpp @@ -0,0 +1,42 @@ +#include +#include +#include +char buff[128]; +void deal() +{ + int dec,binary; + scanf("%d %d",&dec,&binary); + int orgdec=dec; + memset(buff,0,128); + int i=0; + while(dec>=binary) + { + buff[i++]='0'+dec%binary; + dec=dec/binary; + } + buff[i]='0'+dec; + int len=strlen(buff); + int slen=len/2; +#ifndef __GNUC__ + printf("%s\n",buff); +#endif + for(i=0;i0;all--) + { + deal(); + } + return 0; +}