Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main() { int a,b,c,temp; scanf("%d %d %d",&a,&b,&c); temp=a; a=b; b=temp; temp=a; a=c; c=temp; printf("%d %d %d",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_98974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_98974/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> //#include <string.h> //#include <stdbool.h> //#include <limits.h> //#include <math.h> int main() { int x, y ,z; scanf("%d%d%d", &x, &y, &z); printf("%d %d %d\n", z, x, y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99016/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,i,c=0,m,x,y,a[121]={0}; scanf("%d%d",&n,&m); while(n--) { scanf("%d",&x); for(i=0;i<x;i++) { scanf("%d",&y); a[y]++; } } // for(i=1;i<=m;i++) // printf("%d ",a[i]); for(i=1;i<=m;i++) { if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_9906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_9906/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...
#define _CRT_SECURE_NO_WARNINGS #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <limits.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) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99102/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99102/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 x,y,z,tmp; scanf("%d %d %d",&x,&y,&z); tmp=y; y=x; x=tmp; tmp=z; z=x; x=tmp; printf("%d %d %d",x,y,z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99146/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> #include <string.h> #include <math.h> int compare_int(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main(void) { int i, j; // dic_t dic[200000]; int ii[100]; int ilen[100]; int min, max; int len, flg; int cnt, maxcnt; int X,Y,Z; scanf("%d %d %d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99197/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99197/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 m,n,i,j,temp; scanf("%d",&n); scanf("%d",&m); int a[m],on[m]; for(i=0;i<m;i++){ a[i]=0; } for(i=0;i<n;i++){ scanf("%d",&on[m]); for(j=0;j<on[m];j++){ scanf("%d",&temp); a[temp-1]=1; } } for(i=0;i<m;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_9924/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_9924/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 D; scanf("%d",&D); if (D==25) { printf("Christmas\n"); } else if(D==24) { printf("Christmas Eve\n"); } else if(D==23) { printf("Christmas Eve Eve\n"); } else if(D==22) { printf("Christmas Eve Eve Eve\n"); } re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99283/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99283/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 d; scanf("%d",&d); if(d == 25){ printf("Christmas\n"); } else if(d == 24){ printf("Christmas Eve\n"); } else if(d == 23){ printf("Christmas Eve Eve\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99333/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 D; scanf("%d", &D); switch(D) { case 22: puts("Christmas Eve Eve Eve"); break; case 23: puts("Christmas Eve Eve"); break; case 24: puts("Chris...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99377/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 date=0; scanf("%d",&date); if (date==25) printf("Christmas"); else if (date==24) printf("Christmas Eve"); else if (date==23) printf("Christmas Eve Eve"); else if (date==22) printf("Christmas Eve Eve Eve"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99427/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99427/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 i; scanf("%d", &i); if (i == 25){ printf("Christmas\n"); }else if (i == 24){ printf("Christmas Eve\n"); }else if (i == 23){ printf("Christmas Eve Eve\n"); }else{ printf("Christmas Eve Eve Eve\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99470/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 D; scanf("%d", &D); switch (D) { case 25: printf("Christmas\n"); break; case 24: printf("Christmas Eve\n"); break; case 23: printf("Christmas Eve Eve\n"); break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99520/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 d; scanf("%d",&d); printf("Christmas"); for(int i=25;i>d;i--){ printf(" Eve"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99564/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 <math.h> #include <stdlib.h> #include <string.h> int main (){ int D; scanf("%d",&D); if(D == 22){ printf("Christmas Eve Eve Eve"); } if(D == 23){ printf("Christmas Eve Eve"); } if(D == 24){ printf("Christmas Eve"); } if(D == 25){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99614/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(void) { int n; char word[32]; char mini[32]; int i; scanf("%d", &n); scanf("%s", mini); for (i = 1; i < n; i++){ scanf("%s", word); if (strcmp(mini, word) > 0){ strcpy(mini, word); } } printf("%s\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99672/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99672/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(void) { int n, i, j; char s[21] = {0}; char input[21] = {0}; scanf("%d", &n); for(i=0;i<n;i++){ scanf(" %s", input); if(i==0 || i>0 && strcmp(input,s)<0){ for(j=0;j<21;j++){ s[j]=input[j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99722/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(void){ int a,i,j; char str[20],moji[20]; for(i=0;i<20;i++){ moji[i]='z'; } scanf("%d",&a); for(i=0;i<a;i++){ scanf("%s",str); if(strcmp(moji,str)>0){ strcpy(moji,str); } } printf("%s\n",moji); retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99766/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99766/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(){ int a=0,i; char tango[21],out[21]; scanf("%d",&a); scanf("%s",out); for(i=0;i<a-1;i++){ scanf("%s",tango); if(strcmp(tango,out)<0)strcpy(out,tango); } printf("%s\n",out); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99838/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99838/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 m,d,date,count=0,done,dten; scanf("%d %d",&m,&d); for(int i=1;i<=m;i++) { for(int j=1;j<=d;j++) { if(j<=9) continue; done = j%10; dten = j/10; if(done*dten==i && done>=2 && dten>=2)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99881/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99881/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 m, d; scanf("%d %d", &m, &d); if (d < 10) { printf("0\n"); return 0; } else { int cnt = 0; int d10 ; int d1; for (int j = 1; j <= m; j++) { for (int i = 10; i <= d; i++) { d10 = i / 10; d1 = i % 10; //printf("%d %d\n", d10, d1); if (d10 >= 2 && ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99931/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99931/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 a, b; int N; int s, f; int i; int flag; scanf("%d%d", &a, &b); scanf("%d", &N); flag = 0; for (i = 0; i < N; i++){ scanf("%d%d", &s, &f); if (!(b <= s || f <= a)){ flag = 1; } } if (f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_99975/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_99975/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 <ctype.h> #include <stdlib.h> int main() { int H, W; int h, w; while (1) { scanf("%d%d", &H, &W); if (H == 0 && W == 0) break; for (w = 0; w < W; w++) putchar('#'); putchar('\n'); for (h = 2; h < H; h++) { putcha...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100029/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100029/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 a,b,i,n; while(1){ scanf("%d %d",&a,&b); if(a == 0 && b == 0)break; for(i = 1;i<=a;i++){ for(n=1;n<=b;n++){ if(1<i && i<a && n<b && 1<n) printf("."); else printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100072/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100072/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)!=EOF && !(h==0 && w==0)){ 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_100122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100122/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(j=0; j<H; j++){ for(i=0; i<W; i++){ if(i==0 || i==W-1) printf("#"); else if(j==0 || j==H-1) printf("#"); else printf("."); } printf("\n"); } printf("\n"); } return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100173/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100173/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(){ char a = '#'; char A = '.'; int i,j; int b[300][300]; int x,y; while(1){ scanf("%d%d",&x,&y); if (x ==0 && y ==0){ break; } for(i=0;i<x;i++){ for(j=0;j<y;j++){ if( i==0 || i ==x-1 || j==0 || j==y-1) printf("%c",a); else printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100216/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 c[1000], ctmp, comma; int i = 0, cnt, flag[1000] = {0}, index; getchar(); scanf("%c%c", &ctmp, &comma); if(ctmp != '}') { while(comma != '}') { getchar(); c[i++] = ctmp; sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10026/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 = 0; int w = 0; int i = 0; int j = 0; scanf("%d", &h); scanf("%d", &w); while (!((h == 0) && (w == 0))) { for(i = 0; i < h; i++) { for(j = 0; j < w; j++) { if ((i == 0) || (i == (h - 1))) { printf("#"); } else if ((j == 0) || (j == (w - 1))) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100302/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100302/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; scanf("%d %d", &H, &W); while (!(H == 0 && W == 0)) { 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('#'); } putchar('\n'); } putchar('\n'); sca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100346/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100346/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 W,H,i,j; while(1){ scanf("%d %d",&H,&W); if(W==0 && H==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("\n"); } re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100397/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(scanf("%d %d", &h, &w), h > 0 && w > 0){ for(i = 0; i < h; ++i){ for(j = 0; j < w; ++j){ putchar(i == 0 || j == 0 || i == h - 1 || j == w - 1 ? '#' : '.'); } putchar('\n');...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100447/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 = 1; i <= H; i++) if ((i == 1) || (i == H)) { for (j = 1; j <= W; j++) { printf("#"); } printf("\n"); } else { printf("#"); for (j = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100533/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("#"); } else { printf("."); } } printf("\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100584/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100584/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=1;i<=H;i++){ for(j=1;j<=W;j++){ if(i==1||j==1||i==H||j==W){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100627/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100627/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[100],W[100],i,k,ix,o; i=0; while(1){ scanf("%d %d",&H[i],&W[i]); if(H[i]==0&&W[i]==0){ ix=i; break; } i++; } for(i=0;i<ix;i++){ for(o=0;o<H[i];o++){ for(k=0;k<W[i];k++){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100678/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100678/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,x,y,a,b; while(1){scanf("%d%d",&h,&w); if(h==0&&w==0)break; for(a=0;a<w;a++){printf("#");} printf("\n"); for(x=0;x<h-2;x++){ for(y=0;y<w;y++){ if(y!=0&&y!=w-1){ printf("."); }else { printf("#"); } } printf("\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100764/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 || j == 0 || j == w - 1){ printf("#"); } else{ printf("."); } } printf("\n"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100807/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=1;i<=h;i++){ for(j=1;j<=w;j++){ if((i>=2&&i<=h-1)&&(j>=2&&j<=w-1)){ putchar('.'); }else{ putchar('#'); } } putchar('\n'); } putchar('\n'); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100850/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100850/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 high[100]; int width[100]; int i; int j; int count=0; int z; while(1){ scanf("%d %d",&high[count],&width[count]); if(high[count] == 0 && width[count]==0) break; count++; } for(z=0;z<count;z++){ for(i=0;i<high[z];i++){ for(j=0;j<width[z];j++){ if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100894/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(1){ scanf("%d %d",&H,&W); if(H==0&&W==0)break; for(j=0;j<W;j++)printf("#"); printf("\n"); for(i=1;i<H-1;i++){ printf("#"); for(j=1;j<W-1;j++){ printf("."); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100980/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100980/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 unsigned u; u A[111111]; int main() { u n,i=-1,j,k,As=-1,r,R=-1,Asb; for(scanf("%u",&n);++i<n;A[i]=j) { scanf("%u",&j); for(k=j;!(k>>31);k<<=1); As&=k; } for(Asb=As;!(Asb&1);)Asb>>=1; for(;;) { for(r=0,i=-1;++i<n;) { k=A[i]; for(j=Asb;j<k;j<<=1); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10103/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10103/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; while(1){ scanf("%d %d",&h,&w); if(h==0 && w == 0){ break; } int i; for(i=0;i<w;i++){ printf("#"); }//最初の行 printf("\n"); for(i=1;i<h-1;i++){ int j; printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101073/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101073/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,H,W; while(1){ 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(".");} } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101116/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101116/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 x,y,z; }a[1000001]; int main(){ int n; scanf("%d",&n); for(int i=1;i<=n;i++){ int x; scanf("%d",&x); a[x].z++; if(a[x].x==0){ a[x].x=i; a[x].y=i;} else { a[x].y=i; } } int max=-10000000; int k1=0,k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10121/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, i3...
#include<stdio.h> int main(){ int a,b,c,d,e,f; while(1){ scanf("%d %d",&a,&b); if(a==0&&b==0)break; for(c=0;c<a;c++){ for(d=0;d<b;d++){ if(c==0||c==a-1||d==0||d==b-1){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101253/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101253/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<W;i++)printf("#"); printf("\n"); for(int i=1;i<H-1;i++){ printf("#"); for(int j=1;j<W-1;j++) printf("."); printf("#\n"); } for(int i=0;i<W;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101303/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<stdint.h> #include<inttypes.h> typedef int32_t i32; typedef int64_t i64; #define MIN(a,b) ((a)<(b)?(a):(b)) #define ALLOC(size,type) ((type*)calloc((size),sizeof(type))) #define POS(i, j) ((i) * (n + 1) + (j)) void run (void) { i32 n; scanf ("%" SCNi32, &n); i64 *...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101398/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...
// 420 Digits K // 2019.12.26 bal4u #include <stdio.h> #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() { // 非負整数の入力 int n = 0, c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } char A[200005]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101448/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.T = type { i8, i32 ...
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.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 min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101512/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101512/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 N; int u[114514], v[114514], w[114514]; struct hen { int to; int len; }; int edgeCount[114514]; struct hen* edges[114514]; void addEdge(int from, int to, int len) { edges[from] = realloc(edges[from], sizeof(*edges[from]) * (edgeCount[from] + 1)); if (edges[from] == NUL...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101556/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101556/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.hen = type { i32, i...
#include<stdio.h> int main(){ int t; scanf("%d",&t); while(t--){ long long int n,i,j=0,k; scanf("%lld",&n); long long int a[n],b[n]; k=n-1; for(i=0;i<n;i++){ scanf("%lld",&a[i]); if(a[i]%2==0){ b[k--]=a[i]; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1016/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 n, p, i; int a[110]; int num_even = 0; int num_odd = 0; long long combi_odd[50]; scanf("%d %d", &n, &p); for (i = 0; i < n; i++) { scanf("%d", &a[i]); if (a[i] % 2 == 0) { num_even += 1; } else { num_odd += 1; } } combi_odd[0] = 1; comb...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101642/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, d; scanf("%d", &n); int arr[n]; int mysum = 0; for (int i = 0; i < n; i++) { scanf("%d", &d); arr[i] = d; } for (int j = 0; j < n; j++) { for (int k = j + 1; k < n; k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101693/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 N 1000000000 int main(){ int n; scanf("%d",&n); int a[n],c=0; for(int i=0; i<n; i++){ scanf("%d",&a[i]); } for(int i=0; i<n; i++) for(int j=0; j<i; j++){ if(i!=j) c+=a[i]*a[j]; } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101736/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> int isprime(long long p) { int i; double max=sqrt(p); for(i=2;i<=max;i++) if(p%i==0)break; if(i>max && p!=1)return 1; return 0; } long long gcd(long long a,long long b) { long long i; for(i=a<b?a:b;i>0;i--) if((a%i==0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10178/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10178/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; scanf("%d",&n); int a[n]; for(int i=0;i<n;i++) { scanf("%d",&a[i]); } int sum=0; for(int i=0;i<n;i++) { int s=0; for(int j=i+1;j<n;j++) { s=s+a[j]; } sum=sum+a[i]*s; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101822/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101822/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,N,sum=0,a[1000]; scanf("%d",&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\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101866/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101866/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,x; int a[50]={0}; scanf("%d",&N); x = 0; for (i=0; i<N; i++) { scanf("%d", &a[i]); } for (j=0; j<N-1; j++) { for (i=j+1; i<N; i++) { x += a[i]*a[j]; } } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101909/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101909/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[50]; int n;//たこ焼きの個数 int i;//何番目のたこ焼きか int kazu; scanf("%d",&n);//たこ焼きの個数 for(i= 0;i<n;i++) scanf("%d",&N[i]); int souwa = 0; for(i=0;i<n-1;i++) for(kazu = i+1;kazu<n;kazu++) souwa +=N[i]*N[kazu]; printf("%d",souwa); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101952/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101952/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[101]; int taste=0; scanf("%d", &a); for (int t = 0; t < a; ++t) { scanf("%d", &b[t]); } for (int i = 0; i < a; ++i) { for (int k = 0; k < i; ++k) { taste += b[i] * b[k]; } } printf("%d", taste); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101996/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101996/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> #define BUF_SIZE 300 int main(void) { char line[BUF_SIZE]; FILE *fp = stdin; if(!fgets(line, BUF_SIZE, fp)) return 0; int num; sscanf(line, "%d", &num); int *arr = malloc(sizeof(int)*num); int i, j; if(!fgets(line, BUF_SIZE, fp)) return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102038/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" @stdin = external local_unn...
#include<stdio.h> #define MAX 100005 #define NIL -1 typedef struct{ int parent, left, right; }Node; Node Tree[MAX]; int Depth[MAX]; int degree[MAX]; int h; void preOrder(int); void inOrder(int); void postOrder(int); int main(void){ int i, n, root; int vertex; int child[2]; scanf("%d", &n); for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102081/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> typedef struct{ int parent; int left; int right; }Node; Node T[25]; int n; void maigoCenter(void); void printPreorder(int); void printInorder(int); void printPostorder(int); int main(){ int i, id, root; scanf("%d", &n); for(i=0; i<n; i++){ scanf("%d", &id); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102131/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102131/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 26 #define NIL -1 typedef struct{ int p; int l; int r; } Tree; Tree T[MAX]; 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)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102182/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102182/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.Tree = type { i32, ...
#include <stdio.h> #define N 26 #define NIL -1 typedef struct{ int parent; int left; int right; }Tree_t; Tree_t T[N]; int n; void preParse(int u){ if (u == NIL) return; printf(" %d",u); preParse(T[u].left); preParse(T[u].right); } void inParse(int u){ if (u == NIL) return; inParse(T[u].left); printf(" %d",u)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102290/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.Tree_t = 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); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102333/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"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102377/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 argc, char const *argv[]) { int n, m; scanf("%d", &n); m = n / 2 + 1; printf("%d\n", m); for (int i = 1; i < m; i++) { printf("1 %d\n", i); } if (n % 2 == 0) { for (int i = 1; i < m; i++) { printf("%d %d\n",m, i); } } else { for (int i = 1; i <= m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10242/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10242/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; int l; int 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); in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102470/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 200000 typedef struct{ int parent; int left; int right; }gNode; int r_search(); void Inorder(int); void Preorder(int); void Postorder(int); int n; gNode Node[MAX]; int main(){ int i; int id, left, right, root; scanf("%d", &n); for(i = 0 ; i < n ; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102520/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.gNode = type { i32,...
#include<stdio.h> #define MAX 10000 #define NIL -1 struct Node{int p,l,r;}; struct Node T[MAX]; void Preorder(int u) { if (u == NIL) return; printf(" %d", u); Preorder(T[u].l); Preorder(T[u].r); } void Inorder(int u) { if (u == NIL) return; Inorder(T[u].l); printf(" %d", u); In...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102571/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); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102614/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; /* Preorder */ void preParse(int u) { if ( u == NIL ) return; printf(" %d", u); preParse(T[u].l); preParse(T[u].r); } /* Inorder */ void inParse(int u) { if (u == NIL ) return; inParse(T[u].l); p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102658/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 1000000 #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)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102700/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102700/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 p,l,r; }Node; Node T[10000]; int n; void preParse(int); void inParse(int); void postParse(int); int main(){ int i,v,l,r,root; 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[v].r=r; if(l!=-1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102744/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> struct node { int c, l, r; }; struct node t[10000]; void pre(int r) { if (r == -1) return; printf(" %d", r); pre(t[r].l); pre(t[r].r); } void in(int r) { if (r == -1) return; in(t[r].l); printf(" %d", r); in(t[r].r); } void post(int r) { if (r == -1) return; post(t[r].l)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102788/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 pP(int u){ if(u==nil)return; printf(" %d",u); pP(T[u].l); pP(T[u].r); } void iP(int u){ if(u==nil)return; iP(T[u].l); printf(" %d",u); iP(T[u].r); } void posP(int u){ if(u==nil)return; pos...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102830/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102830/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); } voi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102874/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102874/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<string.h> #define POINT_MAX 21 enum { EXISTENCE, //宝石有 NON_EXISTENCE, //宝石無 }; typedef struct coord_info { short x_point; short y_point; } COORD_INFO; typedef struct move_operation { char course; short distance; } MOVE_OPE; short gemsget( char course , short distance, short gem...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102917/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102917/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.move_operation = ty...
#include <stdio.h> #define NO_DATA 999 int main(int argc, const char * argv[]) { int targetCount = 0; int result[300]; int resultCount = 0; for (int i = 0; i < 300; i++ ) { result[i] = NO_DATA; } scanf("%d",&targetCount); while (targetCount != 0) { int targetArray[21] = {0,0,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102975/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102975/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,m,i=-1,j,mc,max,p[10],y,d[5][20],t; char s[5][20],c[20]={"A23456789TJQK"}; char w[5]={"SCHD"}; while(~scanf("%d",&n)){ if(i+1)printf("\n"); for(i=p[0]=0;i<4;i++){ for(j=0;j<13;j++)scanf("%d",&d[i][j]); } for(i=1;i<10;i++)scanf("%d",&p[i]); while(n--)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103017/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103017/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" @__const.main.c = private u...
#include <stdio.h> #include <string.h> int main() { int A,B; char code[20]; int aaa, counts = 0; scanf("%d %d", &A, &B); scanf("%s", code); aaa = strlen(code); if(!(code[A] == '-')){ printf("No"); return 0; } for(int i=0;i<aaa;i++){ if(code[i] == '-'){ counts++; } } if(counts > 1){ printf("No...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103060/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103060/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 a, b; scanf("%d%d", &a, &b); char s[13]; scanf("%s", s); char number[10] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}; int flag = 1; for (int i = 0; i < a; i++){ if (s[i] == '-') flag = 0; } if (s[a] != '-') flag = 0; for (i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103103/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103103/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; char s[15]; scanf("%d%d%s",&a,&b,s); if(s[a]!='-'){ puts("No"); return 0; } for(i=0;i<a+b+1;i++){ if(i!=a){ if(s[i]!='0'&&s[i]!='1'&&s[i]!='2'&& s[i]!='3'&&s[i]!='4'&&s[i]!='5'&& s[i]!='6'&&s[i]!='7'&&s[i]!='8'&& s[i]!='9'){ puts("No"); return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103147/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103147/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; char s[12]; int main(void){ scanf("%d%d",&A,&B); scanf("%s",s); for(int i=0;i<A;i++)if(!('0'<=s[i]&&s[i]<='9')) { puts("No");return 0; } if(s[A]!='-') { puts("No");return 0; } for(int i=A+1;i<=A+B;i++)if(!('0'<=s[i]&&s[i]<='9')) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103198/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 s[205], temp1[205], temp2[205]; int m, h; while (1) { scanf("%s", s); if (!strcmp(s, "-")) break; scanf("%d", &m); for (int i = 0; i < m; i++) { scanf("%d", &h); strcpy(temp1, s + h); s[h] = '\0'; strcpy(temp2, s); sprintf(s, "%s%s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103248/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103248/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 s[256],tmp[256]; int n,h,i,j; while(1){ scanf("%s",s); if(!strcmp(s,"-"))break; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&h); for(j=0;j<h;j++)tmp[j]=s[j]; for(j=0;j<strlen(s)-h;j++)s[j]=s[j+h]; for(j=0;j<h;j++)s[strlen(s)-h+j]=tmp[j]; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103305/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103305/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 <ctype.h> int main(void){ char s[201], tmp[201], num[201]; int h, l; int i, j, n; scanf("%s", s); while(1){ if(!strcmp(s, "-")) break; scanf("%d", &n); l = strlen(s); //printf("n= %d l=%d s=%s\n", n, l, s); for(j=0; j<n; j++){ scanf("%d", &h); /...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103349/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103349/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 cards[201], subbuff1[201], subbuff2[201]; int m, h, len, i; while (scanf("%s", cards) && strcmp(cards, "-")) { len = strlen(cards); scanf("%d", &m); for (i = 0; i < m; i++) { scanf("%d", &h); memcpy(sub...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103392/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103392/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_103435/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103435/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 s[201],t[201]; int n,i,h; while(1){ scanf("%s",s); if(strcmp(s,"-") == 0) break; scanf("%d",&n); for(i = 0; i < n; i++){ scanf("%d",&h); strcpy(t,s+h); strncat(t,s,h); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103486/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103486/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", &h); strcpy(temp, cards); for(i=0; i<h; i++) { cards...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103529/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103529/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> char s[205]; int l,m,h,i; void rev(int r,int l) { char x; for(;r<l;r++,l--) { x=s[r];s[r]=s[l];s[l]=x; } } int main() { for(;scanf("%s",s),s[0]!='-';) { l=strlen(s)-1; scanf("%d",&m); for(i=0;i<m;i++) { scanf("%d\n",&h); rev(0,h-1); rev(h,l); rev(0,l); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103572/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103572/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 [205 ...
#include <stdio.h> #include <string.h> int main(void) { char s[201]; char z[201]; int m; int h[201] = {0}; int length; while (1){ scanf("%s", s); length = strlen(s); if( s[0] == '-'){ break; } scanf("%d", &m); for(int i = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103615/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103615/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 <ctype.h> int main(int argc, char *argv[]) { char next[300], prev[300], sub[300]; int m, h; for (;;) { scanf("%s", prev); if (prev[0] == '-') break; scanf("%d", &m); for (int i = 0; i < m; i++) { scanf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103659/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103659/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,j,k,m,h; char A[201],B[201],C[201]; while(1){ scanf("%s",A); if(strstr(A,"-")!=NULL)break; scanf("%d",&m); for(i=0;i<m;i++){ scanf("%d",&h); for(j=0;j<h;j++)B[j]=A[j]; B[h]='\0'; for(k=0;k<strlen(A)-h;k++)C[k]=A[k+h]; C[strlen(A)-h]='\0'; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103701/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 rep(i, a) for(int i = 0; i < a; ++i) int main(void) { char s[250], t[250]; int m, i, j, n, a; while( 1 ) { scanf("%s", s); n = strlen(s); if(n == 1 && s[0] == '-') break; scanf("%d", &m); rep(i, m) { scanf("%d", &a); rep(j, a) t[j] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103752/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 <math.h> int cmpnum(const void * n1, const void * n2) { if (*(long *)n1 > *(long *)n2) { return -1; } else if (*(long *)n1 < *(long *)n2) { return 1; } else { return 0; } } long modpow(long a, long n, long mod){ if (n == 0) { return 1; } long answer;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103817/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103817/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, a[200+5]; scanf("%d", &n); for(int i=0; i<n; i++)scanf("%d", &a[i]); int min=1000000000; for(int i=0; i<n; i++){ int cnt=0; while(a[i]%2==0 && cnt<min){ a[i]/=2; cnt++; } if(cnt<min)min=cnt; } p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103860/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...