Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main () { int n; int k; int i; int ans = 0; scanf ("%d %d", &n, &k); int h[n]; for (i = 0; i < n; i++) { scanf ("%d", &h[i]); } for (i = 0; i < n; i++) { if (k <= h[i] ) ans++; } printf ("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294585/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294585/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main(){ int n, k; scanf("%d%d", &n, &k); int hight[n]; int count=0; for(int i=0; i<n; i++){ scanf("%d", &hight[i]); if(hight[i]>=k) count++; } printf("%d", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int f(int a,int b){ int r; while(b>0){ r=a%b; a=b; b=r; } return a; } int main(){ int G,N,A; scanf("%d\n",&N); int D[1000001]; int PC[1000001]; for(int i=1;i<=1000000;i++){ D[i]=1; PC[i]=0; } int p=2,k=2; while(p<=1000000){ if(D[p]==1){ D[p]=2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294721/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294721/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> typedef long long ll; struct store { int a; int b; }; int struct_asc(const void *x, const void *y){ struct store *X = (struct store *)x; struct store *Y = (struct store *)y; return X->a - Y->a; } int main(int argc, char *argv[]) { int n, m; scanf("%d %d", &n, &m);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294772/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.store = type { i32,...
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.val = type { i64, i...
#include<stdio.h> int MIN(int a,int b){return a<b?a:b;} int R=1,C=1,H[2000010],N[2000010]; //評価関数(いまはMIN) int hyouka(int a,int b){ if(C<b)return 1; if(C<a||b==0)return 0; return N[H[a]]<N[H[b]]?1:0; } //挿入関数 void hin(int a){ int i=C++; for(N[H[0]=R]=a;hyouka(0,i/2);i/=2)H[i]=H[i/2]; H[i]=R++; } //取り出す関数 int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294873/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294873/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @R = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> int main() { int i,j,x,n,flag; scanf("%d %d",&x,&n); int num[n]; for(i=0;i<n;i++) { scanf("%d",&num[i]); } for(i=0;;i++) { flag=1; for(j=0;j<n;j++) { if((x-i)!=num[j])flag*=1; if((x-i)==num[j]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_ON 1 // 汎用フラグ - ON #define D_OFF 0 // 汎用フラグ - OFF #define D_VAL_MAX 105 // 最大値 // 内部変数 static FILE *szpFpI; // 入力 static cha...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int swap(int a[],int n) { int i,min=1000,min1=1000,x=0; for(i=0;i<n;i++) { if(min>a[i]) { min=a[i]; x=i; } } for(i=0;i<n;i++) { if(min1>a[i]) { if(i==x)continue; min1=a[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29506/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29506/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> int main(){ int X,N; scanf("%d",&X); scanf("%d",&N); int p[100]; for (int i=0; i<N; i++){ scanf("%d", p+i); } int l[100][2]; for (int i=0; i<100; i++){ l[i][0] = 0; l[i][1] = 0; } for (int i=0; i<N; i++){ if (p[i] == X){ l[0][0]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295102/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295102/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void){ int x,n; scanf("%d %d",&x,&n); int p[101]={0}; for(int i=1;i<=n;i++){ scanf("%d",&p[i]); } int tmp; for (int i=1; i<=n; ++i) { for (int j=i+1; j<=n; ++j) { if (p[i] > p[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295146/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int a,b,K; int main() { scanf("%d%d%d",&K,&a,&b); if(a>=K && b>=K) printf("%d",a/K+b/K); else if(a>=K && b<K) printf("%d",a%K ? -1 : a/K); else if(a<K && b>=K) printf("%d",b%K ? -1 : b/K); else printf("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int n; int f[100001]; int e[100001]; int c[100001]; int i; int cnt=0; scanf("%d", &n); for(i=1;i<=n;++i){ scanf("%d", &f[i]); e[i] = 0; } for(i=1;i<=n;++i){ if(f[f[i]] != f[i]){ printf("-1\n"); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29524/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29524/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void){ long int n,k,ans; scanf("%ld %ld",&n,&k); long int nk=n%k; long int k_nk=k-(n%k); if(nk<=k_nk){ ans=nk; }else{ ans=k_nk; } printf("%ld",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295283/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295283/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ long n,k,min; scanf("%ld %ld", &n,&k); n%=k; min=n; while(1){ n-=k; if(n<0){ n*=-1; } /*nを正にする*/ if(n<min){ min=n; } else{ break; } } printf("%ld\n",min); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { long int a, b; long int check = 0; scanf("%ld %ld", &a, &b); a = a % b; for (;;) { check = a - b; if (check < 0) { check = check * (-1); } if (a > check) { a = check; } else { printf("%ld", a); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295384/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295384/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> int main(void) { long long int i,j,n,k; scanf("%lld%lld",&n,&k); i=n%k; if(k-i<0){ if(i-k>i) printf("%lld",i); else printf("%lld",i-k); } else{ if(k-i>i) printf("%lld",i); else printf("%lld",k-i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295434/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295434/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <malloc.h> #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> //abc140D int main(void) { int n, i=0, k, c=0; char sx; scanf("%d %d", &n, &k); int s[n]; for(i=0; i < n; i++){ scanf(" %c", &sx); if(sx == 'L') s[i]=0; else s[i]=2; } for(i=0; i < n; i++){ //s: 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295485/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295485/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> char s[100001]; void swap(int l, int r) { char c,d; while (l<=r) { if (s[l]=='L') c='R'; else c='L'; if (s[r]=='L') d='R'; else d='L'; s[l]=d; s[r]=c; l++;r--; } } int main(){ int n,k,i,j,l,a; scanf("%d %d",&n,&k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295528/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295528/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @s = dso_local global [1000...
#include<stdio.h> int max(int,int); int main(void){ int n,m,h[201],r[201],i,j,t,dp[201],res; while(scanf("%d",&n),n){ for(i=0;i<n;i++)scanf("%d %d",&h[i],&r[i]); scanf("%d",&m); for(i=n;i<n+m;i++)scanf("%d %d",&h[i],&r[i]); for(i=0;i<n+m;i++){ for(j=i;j<n+m;j++){ if(h[i]>h[j]){ t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295571/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) char s[20]; int main(){ scanf("%s",s); ll n=strlen(s); if(n==1){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_295629/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_295629/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<stdlib.h> #include<string.h> int main() { char s[502]; int a[27] = {0}; scanf("%s",s); int i; if(s[0] != 'a') { printf("NO"); return 0; } char z = 'a'; a[0] = 1; int l = strlen(s); for(i=1;i<l;i++) { if(s[i]!= s[i-1] && (a[s[i] -...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29568/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main () { char a[1005]; int b[123],i,c=0; memset(b,0,sizeof(b)); scanf("%[^\n]%s",a); for(i=0;i<strlen(a);i++) { if(a[i]>=97&&a[i]<=122) b[(int)a[i]]=1; } for(i=97;i<=123;i++) { if(b[i]==1) c++; } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10001/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void){ int h, w, i, j; for(;;){ scanf("%d %d", &h, &w); if(h == 0 && w == 0){ break; } for(i=1;i<=h;i++){ for(j=1;j<=w;j++){ if(i==1||i==h||j==1||j==w){ printf("#"); } else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100053/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100053/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int H,W,i,j; while(1){ scanf("%d %d",&H,&W); if(H==0&&W==0) break; for(i=0;i<H;i++){ if(i==0||i==(H-1)) for(j=0;j<W;j++) printf("#"); else{ printf("#"); for(j=1;j<(W-1);j++) printf("."); printf("#"); } printf("\n"); } printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100103/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100103/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int i=0,j=0,a,b; while(1){ scanf("%d %d",&a,&b); if(a == 0 && b == 0){break;} while(j != a){ while(i != b){ if(j == 0 || j == a-1){printf("#");} else if(i == 0 || i == b-1){printf("#");} else{printf(".");} ++i; } printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100154/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int i,j; int H,W; for(;scanf("%d%d",&H,&W),H,W;){ for(i=0;i<H;i++){ for(j=0;j<W;j++){ if(i==0 ||i==H-1 || j==0 ||j==W-1){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100198/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int h,w,i,n; while(1){ scanf("%d %d",&h,&w); if(h==0&&w==0){break;}else { for(i=0;i<h;i++){ for(n=0;n<w;n++){ if(i==0||i==h-1||n==0||n==w-1){printf("#");} else{printf(".");} } printf("\n"); } } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100240/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b,i,j; while(1) { scanf("%d%d",&a,&b); if(a==0&&b==0){break;} for(i=1;i<=a;i++) { for(j=1;j<=b;j++) { if(i>1&&i<a&&j<b&&j>1)printf("."); else printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b,H,W; while(1){ scanf("%d%d",&H,&W); if(H==0&&W==0){ break; } for(a=0;a<H;a++){ for(b=0;b<W;b++){ if(a==H-1||b==W-1||a==0||b==0){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100334/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100334/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int i, j, h, w; while(1){ scanf("%d%d", &h, &w); if(h == 0 && w == 0) break; for(i = 0; i < h; i++){ for(j = 0; j < w; j++){ if(i == 0 || i == h-1 || j == 0 || j == w-1){ printf("#"); }else{ printf("."); } } printf("\n"); } printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100420/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100420/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, const char * argv[]) { int depth,width,i,j; while(1){ scanf("%d %d",&depth,&width); if(depth==0 && width==0){ break; } for(i = 0;depth > i;i+=1){ for(j = 0;width > j;j+=1){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100550/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100550/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int H,W,i,j; while(1){ scanf("%d%d",&H,&W); if(H==0 && W==0) break; for(i=0;i<H;i++){ for(j=0;j<W;j++){ if(i==0 || i==H-1 || j==0 || j==W-1){ printf("#"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100600/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100600/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void sp(int n, int m) { int i, j; for (i = 0; i < n; i++) { for (j = 0; j < m; j++) { if (i == 0 && n - 1 && m - 1 || j == 0 && n - 1 && m - 1 || i == n - 1 && n - 1 && m - 1 || j == m - 1 && m - 1 && m - 1) putchar('#'); else putchar('.'); }putchar('\n'); } } int main() {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int h, w; while(1){ scanf("%d %d", &h, &w); if(h == 0 && w == 0){break;} for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ if(i == 0 || i == h-1 || j == 0 || j == w -1){ printf("#"); }else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100709/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100709/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> //メイン関数 int main(void){ int H, W; while(1){ scanf("%d %d", &H, &W); if(H == 0 && W == 0) break; for(int i=0; i<H; i++){ for(int j=0; j<W; j++){ if(i == 0 || i == H-1) printf("#"); else if(j == 0 || j == W-1) printf("#"); else if(i != 0 && i != H-1) prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int h,w,i,j; while(1){ scanf("%d%d",&h,&w); if(h==0 && w==0){ break; } i=h; j=w; for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(i==0||i==h-1||j==0||j==w-1){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, const char * argv[]) { int H,W; while (1) { scanf("%d %d",&H,&W); if(H==0 && W==0) break; for(int i=0; i<H; i++) { if (i==0 || i==H-1) { for(int j=0; j<W; j++) { printf("#"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int H=0; int W=0; do{ scanf("%d %d",&H,&W); if(H*W==0)break; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ if((i%(H-1)!=0)&&(j%(W-1)!=0)){ printf("."); } else{ printf("#"); } } puts(""); } puts(""); }while(H*W!=0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101111/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int H,W; int i = 0; char sh = '#'; char dot ='.'; for (; i < 10000; i++){ scanf("%d %d", &H, &W); if( H == 0 && W == 0){ break; } int j = 0; for(; j < H;j++){ int k = 0; for(; k < W; k++){ if(j ==0 || j==H-1 || k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101155/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int i, j; int h, w; while (1) { scanf("%d %d", &h, &w); if (h == 0 && w == 0) break; for(i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (i == 0 || i == h - 1) { putchar('#'); } else { if (j == 0 || j == w - 1) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int h, w; int i, j; while (scanf("%d %d", &h, &w), h || w) { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (i == 0 || i == h - 1 || j == 0 || j == w - 1) putchar('#'); else putchar('.'); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101256/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> char arr1[200000 + 20]; char arr2[200000 + 20]; char arr3[200000 + 20]; char ans[300000 + 30]; int vote[200]; int main(void) { int TC, tcase, n; scanf("%d", &TC); for (tcase = 0; tcase < TC; ++tcase) { int c1 = 0, c2 = 0, c3 = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1013/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1013/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include<stdio.h> int main(){ int h,w,i,j,k; scanf("%d %d",&h,&w); for(i=0;;i++){ for(j=0;j<h;j++){ for(k=0;k<w;k++){ if(k>0&&k<w-1&&j!=0&&j!=h-1){ printf("."); }else{ printf("#"); } if(j==h-1&&k==w-1){ printf("\n"); } } pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101342/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101342/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define ll long long ll dp[400][400]; ll presum[401]; ll getsum(int l,int r){ l++;r++; return presum[r]-presum[l-1]; } int a[400]; ll min(ll a, ll b){ return a < b ? a: b; } ll mincost(int l,int r){ if(dp[l][r]!=0) return dp[l][r]; if (r-l+1==2) return a[l]+a[r]; if (l==r) return 0; ll mc = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101393/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @presum = dso_local local_u...
#include <stdio.h> int main(void){ int n,a,b,c,x,y[100],i,cnt; while(1){ BACK: scanf("%d %d %d %d %d",&n,&a,&b,&c,&x); if(!n) break; for(i=0;i<n;i++) scanf("%d",&y[i]); cnt=0; i=0; while(1){ if(x==y[i]) i++; if(i==n) break; x=(a*x+b)%c; cnt++; if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101472/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int asc(const void* a,const void* b) { if (*(long long int*)a < *(long long int*) b)return 1; if (*(long long int*)a > * (long long int*) b)return -1; return 0; } int main() { long long int n, k; scanf("%lld %lld", &n, &k); long long int i, a[200005], f[200005]; for (i = 0; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101544/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101544/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> long combi(int,int); int main(){ long ans=0; int N,P,A,count_e=0,count_o=0; scanf("%d%d",&N,&P); for (int i = 0; i < N; i++) { scanf("%d",&A); if (A%2==0) { count_e++; }else { count_o++; } } if (P) { for (int i = 0; i <= N; i++){ for (in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101588/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101588/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n,p,a[55],i; int num_1=0; long long int ans,m; scanf("%d%d",&n,&p); for(i=0;i<n;i++) { scanf("%d",&a[i]); if(a[i]%2) num_1++; } if(num_1==0) { if(p) { printf("0"); return 0; } else { if(n%2) { ans=1<<(n/2); m=2<<(n/2); printf("%lld",m*a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101681/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101681/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main () { int n,i,j,sum=0; scanf("%d", &n); int a[n]; for(i=0;i<n;i++){ scanf("%d", &a[i]); } for(i=0;i<n;i++){ for(j=i+1;j<n;j++){ sum=sum+(a[i]*a[j]); } } printf("%d", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101724/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int N, d[100], sum=0; scanf("%d", &N); for(int i=0;i<N;i++){ scanf("%d", &d[i]); }; for(int i=0;i<N;i++){ for(int j=0;j<N;j++){ if(i!=j){ sum+=d[i]*d[j]; } } } printf("%d", sum/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101775/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MAX 50 int main() { int N,i,j,temp,sum=0; int arr[MAX]; while(scanf("%d",&N)!=EOF) { for(i=0;i<N;i++) { scanf("%d",&temp); arr[i]=temp; } for(i=0;i<N;i++) { for(j=i+1;j<N;j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101818/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101818/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n; scanf("%d", &n); int arr[55]={0}; for(int i=0; i<n; i++) scanf("%d", &arr[i]); int ans = 0; for(int i=0; i<n; i++) for(int j=i+1; j<n; j++) ans += arr[i]*arr[j]; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101861/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101861/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n; scanf("%d", &n); int d[n], ans=0; for (int i=0; i<n; i++) { scanf("%d", d+i); } for (int i=0; i<n-1; i++) { for (int j=i+1; j<n; j++) { ans += d[i]*d[j]; } } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101904/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101904/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int N,i,j; scanf("%d",&N); int d[N+1],S=0,a=0; for(j=1;j<=N;j++){ scanf("%d",&d[j]); } if(N==2){ S = d[1]*d[2]; }else{ for(i=0;i<=N-2;i++){ a += d[N-i]; S += d[N-i-1]*a; } } printf("%d",S); return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101948/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101948/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int n; int d[200]; int count; int sum=0; int count2; scanf("%d",&n); for(count=0;count<=n;count++){ scanf("%d",&d[count]); } for(count2=0;count2<n;count2++){ for(count=count2+1;count<n;count++){ sum=sum+(d[count2]*d[count]); } } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101991/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101991/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <math.h> int main(void){ int i,j; int N; long ans=0; scanf("%d",&N); int d[N+1]; for(i=1; i<=N; i++){ scanf("%d",&d[i]); } for(i=1;i<=N-1; i++){ for(j=i+1; j<=N; j++){ ans+=d[i]*d[j]; } } printf("%ld\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102033/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> struct Node { int parent; int left; int right; }; int n; void Preorder(int); void Inorder(int); void Postorder(int); struct Node tree[30]; int dipth[30],height[30]; int main(){ int i,id,left,right,root; scanf("%d",&n); for(i=0;i<n;i++)tree[i].parent=tree[i].left=tree[i].right=-1; for(i=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102077/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> #define MAX 10000 #define NIL -1 struct Node{ int p, l, r; }; struct Node T[MAX]; int n; void preorder(int); void inorder(int); void postorder(int); int main() { int id, left, right; int i, tmp; scanf("%d", &n); for( i = 0 ; i < n ; i++ ) T[i].p = NIL; for( i = 0 ; i < n ; i++ )...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> #define MAX 25 void preParse(int); void inParse(int); void postParse(int); typedef struct node{int p,l,r;}Node; Node T[MAX]; int n; int main(){ int i,l,r,p,root,v; scanf("%d",&n); for(i=0;i<n;i++){ T[i].p=-1; } for(i=0;i<n;i++){ scanf("%d%d%d",&v,&l,&r); T[v].l=l; T[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102213/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include <stdio.h> #define MAX 10000 struct node{ int p, q, r; }; struct node T[MAX]; int n; void preorder(int t){ if(t == -1) return; printf(" %d",t); preorder(T[t].q); preorder(T[t].r); } void inorder(int t){ if(t == -1) return; inorder(T[t].q); printf(" %d",t); inorder(T[t].r); } void p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102279/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102279/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
//ALDS1_7_C:Tree Walk #include <stdio.h> #define MAX 10000 #define NIL -1 struct Node{int p,l,r;}; struct Node T[MAX]; int n; /*前序遍?*/ void preParse(int u){ if(u==NIL)return; printf(" %d",u); preParse(T[u].l); preParse(T[u].r); } /*中序遍?*/ void inParse(int u){ if(u==NIL)return; inParse(T[u].l); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102321/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102321/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #define max 10000 #define NIL -1 struct node{int p,l,r;}; struct node t[max]; int n; void preparse(int u){ if(u==NIL) return; printf(" %d",u); preparse(t[u].l); preparse(t[u].r); } void inparse(int u){ if(u==NIL) return; inparse(t[u].l); printf(" %d",u); inparse(t[u].r); } void postparse(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102372/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102372/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include <stdio.h> typedef struct {/*parent,left child ,right sibling*/ int p,l,r; } node; node T[27]; void Preorder(int ); void Inorder(int ); void Postorder(int ); int main() { int n,i,id,l,r; scanf("%d",&n); for(i=0;i<n;i++) { T[i].p = T[i].l = T[i].r = -1; } for(i=0;i<n;i++) { scanf("%d%d%d",&id,&l,&r); T[id].l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include <stdio.h> typedef struct { int left; int right; int par; }data; void preorder(data* T,int i) { printf(" %d", i); if(T[i].left!=-1) preorder(T,T[i].left); if(T[i].right!=-1) preorder(T,T[i].right); } void inorder(data* T, int i) { if (T[i].left != -1) inorder(T,T[i].left); printf(" %d", i); if(T[i]....
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102473/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.data = type { i32, ...
#include <stdio.h> #define MAX 100005 #define NIL -1 struct Node { int parent, left, right; }; struct Node Tree[MAX]; int n; void preParse(int u) { if ( u == NIL ) return; printf(" %d",u); preParse(Tree[u].left); preParse(Tree[u].right); } void inParse(int u) { if ( u == NIL ) return; inParse(Tree[u].left)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102516/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102516/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> #pragma warning(disable:4996) int main() { int n; scanf("%d", &n); int m = n / 2 + 1; printf("%d\n", m); int r = 1; int c = 1; int k = 1; while (k <= n) { printf("%d %d\n", r, c); if (k % 2 == 0) r++; else c++; k++; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10256/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #define MAX 10000 #define NIL -1 struct Node { int p , l , r;}; struct Node T[MAX]; int n; //先行 void preParse(int u) { if( u == NIL) return; printf(" %d",u); preParse(T[u].l); preParse(T[u].r); } //中間 void inParse(int u) { if( u == NIL) return; inParse(T[u].l); printf(" %d",u); inParse(T...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102602/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef struct Node{ int val; struct Node* next; } Node; typedef struct Graph{ Node** tree; } Graph; Node* newNode(int val){ Node* newNode = (Node*) malloc(sizeof(Node)); newNode->val = val; newNode->next = NULL; return newNode...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102646/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102646/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> int main() { int n,x,a=1,b=1,y,i; scanf("%d",&n); x=(n/2); printf("%d\n",x+1); if(n==1) { printf("1 1\n"); } else { printf("1 1\n"); for(i=2;i<=n;i++) { if(i%2==0) b++; else a++; printf("%d %d\n",a,b); } } return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #define MAX 10000 #define NIL -1 struct Node {int p, l, r;}; struct Node T[MAX]; int n; /* 先行順巡回 */ void preParse(int u) { if(u == NIL) return; printf(" %d",u); preParse(T[u].l); preParse(T[u].r); } /* 中間順巡回 */ void inParse(int u) { if(u == NIL) return; inParse(T[u].l); printf(" %d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102732/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #define NIL -1 struct Node {int p, l, r;}; struct Node T[10000]; int n; void Preorder(int x) { if (x == NIL) { return; } printf(" %d", x); Preorder(T[x].l); Preorder(T[x].r); } void Inorder(int x) { if (x == NIL) { return; } Inorder(T[x].l); printf(" %d", x); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #define MAX 10000 #define NIL -1 struct Node{int p,l,r;}; struct Node T[MAX]; int n; void preParse(int u){ if(u==NIL)return; printf(" %d",u); preParse(T[u].l); preParse(T[u].r); } void inParse(int u){ if(u==NIL)return; inParse(T[u].l); printf(" %d",u); inParse(T[u].r); } void postP...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102833/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> int main(void) { int hani[21][21]; int n,m; int x,y; int i,j; int iti_x,iti_y; int ryou; int ok = 0; int ii,jj; char get[10]; char muki; while(1){ ok = 0; iti_x = iti_y = 10; for(i = 0;i < 21;i++){ for(j = 0;j < 21;j++){ hani[i][j] = 0; } } scanf("%d",&n); //pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102891/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// Aizu Vol-20 2000 Misterious Gems // 2017.8.12 bal4u@uu #include <stdio.h> #include <string.h> char a[22][22]; int main() { int n, x, y, m, s; int i; char d[3]; while (1) { scanf("%d", &n); if (!n) break; memset(a, 0, sizeof(a)); for (i = 0; i < n; i++) scanf("%d%d", &x, &y), a[x][y] = 1; scanf("%d", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <limits.h> int main(void){ int n; scanf("%d",&n); int m=0,head[n*2],next[n*2],to[n*2],a,b,post[n],count; bool visited[n]; for (int i=0; i<n; i++){ head[i]=-1; } for (int i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102992/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define VERYBIG 200000000000007LL #define MOD 1000000007 typedef uint64_t ull; ty...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103034/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hw = type { i32, i3...
#include<stdio.h> int main(void) { int i,a,b; char s[12]; scanf("%d%d%s",&a,&b,s); if(s[a]!='-'){ printf("No"); return 0; } for(i=0;i<a;i++){ if(s[i]<'0' || s[i] >'9'){ printf("No"); return 0; } } for(i=a+1;i<a+b+1;i++){ if(s[i]<'0' || s[i] >'9'){ printf("No"); return 0; } } printf("Yes")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main (){ int i=0,k=0,a,b; char s[20]; scanf ("%d%d%s",&a,&b,s); for (i=0;s[i]!=0;i++){ if (i!=a && s[i]<'9'+1 && s[i]>'0'-1){ ; } else if (i==a && s[i]=='-'){ ; } else { k++; break; } } if (k==0){ printf ("Yes"); } else { printf ("No"); } return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103135/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a, b; char s[16] = {}; scanf("%d %d %s", &a, &b, s); if (s[a] == '-') { int c = 0; for (int i=0; i<a; i++) if (s[i] >= '0' && s[i] <= '9') c++; for (int i=a+1; i<=a+b; i++) if (s[i] >= '0' && s[i] <= '9') c++; if (c == a+b) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103179/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103179/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int a,b; char s[20]; scanf("%d%d%s",&a,&b,s); int i,l,k,m; k=0;l=0;m=0; for(i=0;i<(a+b+1);i++) { k++; if(s[i]=='-') { l=l+10; m++; } if(l<10) { l++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103221/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #define MAX 200 int main(void) { char First[MAX]; char Copy1[MAX]; char Copy2[MAX]; int m, h, length; char str; while(1) { scanf("%s", First); if(strcmp(First, "-") == 0) { break; } scanf("%d", &m); length = strle...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103265/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103265/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> void shuffle(char a[], int b); int main(){ int t,b,i; char ini[201]; while(1){ scanf("%s",ini); if(ini[0]=='-') return 0; scanf("%d",&t); for(i=0;i<t;i++){ scanf("%d",&b); shuffle(ini,b); } printf("%s\n",ini); } return 0; } void shuffle (cha...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103308/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103308/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main() { char str1[205], str2[205]; char *f=str1, *b=str2, *p, i; int m, h, len; while(scanf(" %s", f)) { if(strcmp(f, "-")==0) break; for(len=0; f[len]; len++); scanf("%d", &m); for(i=0; i<m; i++) { scanf("%d", &h);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ITP1_9_B */ #include <stdio.h> #include <string.h> #define MAX_CARD_CNT 201 /* ??????????????????????????¢??° */ void init_char_array(char array[], short length); /* ?????£?????????????????? */ void do_shuffle(char array[], short pos, short length); int main(void) { char cards[MAX_CARD_CNT]; short shuffle_cnt, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ int i, r, n, n2, z, x; char moji1[201] = {}, tmp1, tmp2; for(;scanf("%s",moji1),moji1[0] != '-';){ scanf("%d", &n); for( i = 0; i < n; i++ ){ scanf("%d", &n2); for( r = 0; r < n2; r++ ){ for( z = 0; z ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103445/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103445/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { char ch[201]; char tmp[201]; int n, i, s, len; while(1) { scanf("%s", &ch); if (ch[0] == '-') break; len = strlen(ch); scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &s); strcpy(tmp, ch); strcpy(ch, tmp + s); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ int m, h; char cards[256], temp[256], result[256]; int i, j=0, len; while(1){ scanf("%s", cards); len=strlen(cards); if(strcmp(cards, "-")==0&&len==1)break; scanf("%d", &m); for(;m>0;m--){ scanf("%d", &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103546/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103546/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void) { int n, k; scanf("%d %d", &n, &k); printf("%d\n", 2*n + 1 + (((n-k) < k-1) ? (n-k) : k - 1) + n - 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> int main() { char s[205]; char nd[] = "-"; int n, t1, cnt; while (1) { scanf("%s", s); if (strcmp(s, nd) == 0) break; scanf("%d", &n); cnt = 0; while (n--) { scanf("%d", &t1); cnt += t1; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103632/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void){ int m,i,h,len; int count=0; char str[404],inc[203]; while(1){ scanf("%s",str); if(str[0]=='-'){ break; } scanf("%d",&m); for(i=0;i<m;i++){ scanf("%d",&h); count+=h; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103683/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { char in[201], tmp[201]; int m, n, i, j; while (1) { scanf("%200s ", in); if (in[0] == '-') break; scanf("%d ", &m); while (m--) { scanf("%d ", &n); for (i = 0; in[i+n] != '\0'; i++) { tmp[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n; scanf("%d\n",&n); int l[n]; int r[n]; for(int i=0;i<n;i++) { scanf("%d %d\n",&l[i],&r[i]); } int k; scanf("%d",&k); int flag=0; for(int i=0;i<n;i++) { if(k>r[i]) flag++; else break; } pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10377/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103834/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103834/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.sd = type { i32, i3...
#include <stdio.h> #define min(x, y) ((x)<(y) ? (x) : (y)) int main(){ int n; scanf("%d", &n); int ans = 1<<30; while(n--){ int a; scanf("%d", &a); int count = 0; while(a % 2 == 0){ count++; a >>= 1; } ans = min(ans, count); } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103878/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int i, count, N, A[200]; scanf("%d", &N); for (i = 0; i < N; i++) scanf("%d", &(A[i])); for (count = 0; ; count++) { for (i = 0; i < N; i++) { if (A[i] % 2 == 1) break; } if (i < N) break; else { for (i = 0; i < N; i++) A[i] /= 2; } } printf("%d\n", count); fflush...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103920/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdlib.h> #include <stdio.h> int main(void) { int i,n,k=0; long seisuu[210]={0}; int hantei = 0; scanf("%d", &i ); for (n = 0 ; n < i ; n++) scanf("%ld",&seisuu[n]); while (hantei == 0) { for (n = 0 ; n < i ; n++) { if (seisuu[n] % 2 != 0) {hantei = 1; break;} else sei...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103964/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> // 15min int main(void){ int n = 0; int a[201]; int ans = 0; scanf("%d", &n); for(int i = 0; i < n; i++){ scanf("%d", &a[i]); if(a[i] % 2 != 0){ printf("0\n"); return 0; } } while(1){ for(int i = 0; i < n; i++){ if(a[i] % 2 != 0){ printf("%d\n", an...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104013/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104013/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...