Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<math.h> #include<string.h> int main( ) { int i; int a[5]={2,4,5,7,9}; int b[5]={0,1,6,8}; int c=3; int n; scanf("%d",&n); int x; x=n%10; for(i=0;i<5;i++) { if(a[i]==x) {printf("hon");return 0;} } for(i=0;i<4;i++) { if(b[i]==x) {printf("pon");return 0;} } if(x==c) {pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216302/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216302/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); if(N % 10 == 0 || N % 10 == 1 || N % 10 == 6 || N % 10 == 8) printf("pon"); else if(N % 10 == 3) printf("bon"); else printf("hon"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216346/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216346/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 re[110][250]; int main() { char s[110]; int T,t,i,k; scanf("%d",&T); for(t=0;t<T;t++) { scanf("\n%s",s); k=0; for(i=0;s[i+1]!='\0';i++) { if(s[i]!=s[i+1]) { k=-1; break; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21639/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 n; scanf("%d", &n); if(n % 10 == 3) { printf("bon\n"); } else if(n % 10 == 0 || n % 10 == 1 || n % 10 == 6 || n % 10 == 8) { printf("pon\n"); } else { printf("hon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216447/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); while(N>=10) N%=10; if(N==3) printf("bon"); else if(N==0 || N==1 || N==6 ||N==8) printf("pon"); else printf("hon"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216490/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216490/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 main(void) { int n; scanf("%d",&n); switch(n%10) { case 2: case 4: case 5: case 7: case 9: printf("hon\n"); break; case 0: case 1: case 6: case 8: printf("pon\n"); break; default: ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216533/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 s = n % 10; if(s == 2 || s == 4 || s == 5 || s == 7 || s == 9)puts("hon"); else if(s == 3)puts("bon"); else puts("pon"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216577/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<ctype.h> #include<limits.h> #include<float.h> #include<math.h> #include<stdbool.h> #include<stdio.h> #include<stdlib.h> #include<string.h> #define min(x, y) ((x<y) ? x : y) #define max(x, y) ((x<y) ? y : x) #define loop(a, b, c) for(long long int a = b; a < c; a++) #define loop_(a, b, c) for(long long int a = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21662/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 k; char s[110]; scanf("%d\n",&k); scanf("%s",s); // for(int i=0;s[i]!='\0';i++) //scanf("%c",s[i]); if(strlen(s)<=k){ printf("%s",s); return 0; } else if(strlen(s)>k){ scanf("%d",&k); scanf("%s",s); s[k]='\0'...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216678/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216678/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(void){ char s[101]; int i, n, h; scanf("%d",&n); scanf("%s",s); h = strlen(s); if(h<=n){ printf("%s",s); }else{ for(i=0;i<n;i++){ printf("%c",s[i]); } printf("..."); } r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216720/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216720/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 K; char S[101]; scanf("%d", &K); scanf("%s", S); int LengthS = strlen(S); if (K >= LengthS) { printf("%s",S); } else if (K < LengthS){ for (int i=0; i<K; i++ ){ printf("%c",S[i]); } printf("..."); } return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216764/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(){ int i,K; scanf("%d",&K); char S[100]; scanf("%s",S); int length = strlen(S); if(length <= K){ printf("%s\n",S); }else{ for(i=0;i<K;i++) printf("%c",S[i]); printf("...\n"); } return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216814/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216814/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 k; scanf("%d",&k); char s[101]; scanf("%s",s); if(strlen(s) <= k) printf("%s",s); else{ for(int i = 0; i < k; i++) printf("%c",s[i]); printf("..."); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216858/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216858/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 str[100]; int num; int i; int cnt = 0; scanf("%d\n",&num); scanf("%s",str); for(cnt = 0;str[cnt]!='\0';cnt++); if(num >= cnt){ printf("%s",str); }else{ str[num] = '.'; str[num+1] = '.'; str[num+2] = '.'; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216908/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216908/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 a; char s[150]={0}; char x[150]={0}; char b[]="..."; scanf("%d",&a); scanf("%s",s); if(strlen(s)<=a){ printf("%s",s); }else{ strncpy(x,s,a); strcat(x,b); x[a+3]='\0'; printf("%s",x); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216959/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 100 int main(void) { int k, i; char s[MAX]; for (i = 0; i < MAX; i++) { s[i] = '\0'; } scanf("%d", &k); scanf("%s", s); if (strlen(s) <= k) { printf("%s\n", s); } else { for (i = 0; i < k; i++) { printf("%c", s[i]); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217000/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> #include<string.h> #include<math.h> int main(){ int K; char S[101]; scanf("%d %s",&K,S); for (int i=0; S[i]!='\0' ; i++) { if (K==i) { printf("...\n"); return 0; } else{ printf("%c",S[i]); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217044/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; char s[100010]={}; scanf("%d %s",&n,s); if(s[n]){ for(i=0;i<n;i++)printf("%c",s[i]); printf("...\n"); } else printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217095/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> double stack[100]; int top; void push(double n); double pop(void); int main(void) { char str[100]; char str1[100]; char *token; double temp1; double temp2; int i; // extras int flag; // scanf("%[^\n]%*c", str) != EOF while (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217196/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217196/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...
// TP1_5_C: Print a Chessboard #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 (h = 0; h < H; h++) { for (w = 0; w < W; w++) { putchar(((h ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217260/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,k,H[300],W[300]; for(i=0;;i++){ scanf("%d %d",&H[i],&W[i]); if(H[i]==0&&W[i]==0){ break; } } for(i=0;H[i]!=0||W[i]!=0;i++){ for(j=0;j<H[i];j++){ for(k=0;k<W[i];k++){ if(j%2==k%2){ printf("#"); }else{ printf("."); } } printf("\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217303/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 markY = '#'; void reverse(char *mark) { *mark = (*mark == '#') ? '.' : '#'; } void writeLine(int num) { char markX = markY; int i; for(i = 0; i < num; i++) { printf("%c" , markX); reverse(&markX); } printf("\n"); reverse(&markY); } int main () { int width , height; int i , s; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217369/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217369/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" @markY = dso_local local_un...
#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 (i = 0; i < H / 2; i++) { for (j = 0; j < W / 2; j++) printf("#."); if (W % 2 == 1) putchar('#'); putchar('\n'); for (j = 0; j < W / 2; j++) printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217411/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; } else{ for(i=0;i<h;i++){ for(j=0;j<w;j++){ if((i+j)%2==0){ printf("#"); } else{ printf("."); } } printf("\n"); } } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217455/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[300],W[300],Count=0,i,hi,wi; while(1){ scanf("%d %d",&H[Count],&W[Count]); if(H[Count]==0&&W[Count]==0){ break; } Count++; } for(i=0;i<Count;i++){ for(hi=0;hi<H[i];hi++){ if(hi%2==0){ for(wi=0;wi<W[i];wi++){ if(wi%2==0)printf("#"); if(wi%2==1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217499/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 i,j,H,W; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0){ break; }else{ for(i=0;i<H;i++){ for(j=0;j<W;j++){ if((i+j)%2==1){ printf("."); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217549/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; do{ scanf("%d %d",&h,&w); for(i=1;i<=h;i++){ for(j=1;j<=w;j++){ if((i+j)%2==0) putchar('#'); else putchar('.'); } putchar('\n'); } if(w!=0 || h!=0) putchar('\n'); }while(w!=0 && h!=0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217592/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[300],W[300],i,j,k,flag=1,cnt=0; do{ scanf("%d %d",&H[cnt],&W[cnt]); if(H[cnt]==0&&W[cnt]==0){ flag=0; } cnt++; }while(flag); for(i=0;i<cnt-1;i++){ for(j=0;j<H[i];j++){ for(k=0;k<W[i];k++){ if((j+k)%2==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217729/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; scanf("%d %d",&H,&W); while(H || W){ for(i = 0;i<H;i++){ for(j = 0;j<W;j++){ if((i + j) % 2 == 0){ printf("#"); } else { printf("."); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217815/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 height, width; // ??????????????? while(1) { scanf("%d %d", &height, &width); if(height == 0 && width == 0) break; // ???????????°?????????????????? for(int line = 1; line <= height; line++) { for(int column = 1; colum...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217866/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217866/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 x, y, i, j ; int con=0; for(;;){ int con=0; scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break;int con=0; } for (i = 0; i < x; i++) { for (j = 0; j < y; j++) { if (con % 2 == 0) { printf("#"); } else { printf("."); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217916/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217916/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 <stdbool.h> #include <assert.h> #define MAX 666 #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) int first[MAX], lol[MAX][MAX]; char A[MAX], B[MAX], str[MAX][MAX]; int n, a, b, k, f, len, S[MAX], T[MAX], cost[MAX], gain[MAX], dp[MA...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21796/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" @len = dso_local local_unname...
#include<stdio.h> int main(void){ int H,W; int h,w; while(1){ scanf( "%d %d",&H, &W ); if( H == 0 && W == 0 ){ break; } for(h=0; h<H; h++){ for(w=0; w<W; w++ ){ if( (h+w)%2 == 0 ){ printf("#"); } else{ printf("."); } } printf("\n"); } printf("\n"); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218001/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 printChess(int,int); int main(void) { int w,h; for(;;) { scanf("%d%d",&h,&w); if(h==0&&w==0) break; printChess(h,w); } return 0; } void printChess(int h,int w) { int i,j; for(i=0;i<h;i++) { for(j=0;j<w;j++) { if((i+j)%2==0) printf("#...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218045/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218045/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; int H,W; while(1){ scanf("%d %d",&H,&W); if(H == 0 && W == 0)break; else for(i=1;i<=H;i++){ for(j=1;j<=W;j++){ if(i % 2 == 0 && j % 2 == 0){ printf("#"); } else if(i % 2 == 0 && j % 2 != 0){ printf("."); } else if(i % 2 != ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218146/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 argc, char **argv) { int n ; scanf("%d",&n); int *a = (int *)malloc(n * sizeof(int)); int i; for(i=0;i<n;i++) scanf("%d",&a[i]); int average; average = a[1] - a[0] ; for(i=2;i<n;i++) { if(average != a[i] - a[i-1]) { printf("%d",a[n-1]); r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21819/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21819/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,i,j; for(;;){ scanf("%d %d",&y,&x); if(x+y==0) break; for(i=0;i<y;i++){ for(j=0;j<x;j++) if((i+j)%2==0) printf("#"); else printf("."); printf("\n"); } printf("\n"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218232/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218232/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; }else{ for(i=0;i<H;i++){ for(j=0;j<W;j++){ if((i%2==1 &&j%2==0) || (i%2==0 &&j%2==1)){ printf("."); }else{ printf("#"); } } printf("\n"); } } printf("\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218276/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218276/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...
// // main.c // Print a Chessboard // // Created by 曾億宜 on 2019/10/6. // Copyright © 2019 曾億宜. All rights reserved. // #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++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218377/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, tb, i, A[100]; scanf ("%d",&n); for (i=0; i<n; i++) { scanf ("%d",&A[i]); } tb = A[1] - A[0]; for (i=2; i<n; i++) { if (tb != A[i] - A[i-1]) tb = 0; } printf ("%d", A[n-1] + tb); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21842/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; H = 1; W = 1; while (H != 0 || W != 0){ scanf("%d %d", &H, &W); if(H == 0 && W == 0) return 0; for (i = 0; i < H; i++) { for (j = 0; j < W; j++) { if ((i + j) % 2 == 0 )printf("#"); else printf("."); } printf("\n"); } pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218470/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 (scanf("%d%d", &H, &W) == 2 && (H|W) != 0) { int i, j; for (i = 0; i < H; i++) { for (j = 0; j < W; j++) putchar((i + j) % 2 == 0 ? '#' : '.'); putchar('\n'); } putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218520/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() { long long int a,b,k ; scanf ("%lld%lld%lld",&a,&b,&k); if (a>=k){ printf("%lld %lld",a-k,b); } else if (a<=k && a+b>=k){ printf("0 "); printf("%lld",(b-(k-a))); } else if (a+b<=k) printf("0 0"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218571/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 long int a, b, k; scanf("%lld %lld %lld", &a, &b, &k); if (a >= k) //高橋君のクッキーだけで終わる場合 { printf("%lld %lld\n", a - k, b); } else if (b + a >= k) //青木君のクッキーも食べる場合 { printf("0 %lld\n", b - k + a); } else //両方のクッキーを食べ終わる場合 { printf("0 0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218621/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218621/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(){ long long a,b,k; scanf("%lld %lld %lld", &a, &b, &k); if(a > k) a = a - k; else{ k = k - a; a = 0; if(b > k) b = b - k; else b = 0; } printf("%lld %lld\n", a, b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218665/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218665/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 long int a, b, k; scanf("%lld %lld %lld",&a,&b,&k); if (a > k){ a -= k; }else if (a+b <= k){ a = b = 0; }else { b -= k - a; a = 0; } printf("%lld %lld",a,b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218708/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 long int a, b, k; scanf("%lld%lld%lld", &a, &b, &k); long long int aa, bb, kk; if(a <= k){ kk = k - a; aa = 0; bb = b - kk; }else{ aa = a - k; bb = b; } if(bb < 0) bb = 0; printf("%lld %lld", aa, bb); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218759/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218759/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> typedef long long ll; int main(void){ ll A, B, K; scanf("%lld %lld %lld", &A, &B, &K); ll i=0; if(A<=K && B <= (K-A)){ A=0; B=0; printf("0 0"); return 0; }else if(A<=K && B>(K-A)){ B=B-(K-A); A=0; }else{ A=A-K; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218809/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218809/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> int main(void) { int i, j, k, l,m; scanf("%d", &i); j = 0; for (m = 0; m <= 10000; m++) { if (j * (j + 1) / 2 >= i) { k = -i + j * (j + 1) / 2; for (l = 1; l <= j; l++) { if (k != l) { printf("%d\n", l); } }break; } else { j++; } } return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218852/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 <ctype.h> #include <limits.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <tgmath.h> int main(int argc, char **argv) { int n; int s[10][10] = {{0}}; scanf("%d", &n); for (int i = 1; i <= n; i++) { int a = i % 10; int b = 0; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218902/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218902/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 gcd(int a, int b) { return a == 0 ? b: gcd(b%a, a); } int main() { int x; scanf("%d", &x); int d = gcd(x, 180); int nx = x / d, ny = 180 / d; if (nx & 1) ny *= 2; printf("%d", ny); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218946/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 x; scanf("%d", &x); int ans = 1, d = x; while (d % 360 > 0) { ans++; d += x; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218997/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(a,b)(a>b?a:b) int main() { long long N, T, A; long long nowT, nowA, coef; scanf("%lld", &N); scanf("%lld%lld", &T, &A); while (--N) { scanf("%lld%lld", &nowT, &nowA); if (T%nowT != 0) { T += nowT - T%nowT; } if (A%nowA != 0) { A += nowA - A%nowA; } coef = MAX(T / nowT, A / n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219046/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[101],t[101]; int n,i,j; scanf("%d%s%s",&n,s,t); for(i=strlen(s);i>0;i--){ for(j=0;i>j;j++)if(s[strlen(s)-i+j]!=t[j])break; if(j==i)break; } printf("%d",strlen(s)*2-i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219097/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219097/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[500001]; scanf("%s", s); long length = strlen(s); long a[length+1]; for (long i = 0; i < length+1; i++) { a[i] = -1; } if (s[0] == '<') { a[0] = 0; } for (long i = 1; i < length; i++) { if (s[i-1] == '>' && s[i] == '<') { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219147/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219147/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> double min(double a, double b) { if (a < b) return a; else return b; } int main() { int n, m; scanf("%d %d", &n, &m); double a[1003], b[1003]; int i; for (i = 0; i < n; i++) scanf("%lf", &a[i]); for (i = 0; i < m; i++) sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219204/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219204/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> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) void run(void){ int n,a,b; scanf("%d%d%d",&n,&a,&b); if(ABS(a-b)==1 && (a==1 || a==n)){ printf("Borys\n"); return; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219255/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...
//Twelvefold way[syazou 12-sou] #include<stdio.h> #define mod 1000000007 #define faclim 1048576 #define partition_nlim 1024 #define partition_klim 1024 long long power(long long a,long long b){ long long x=1,y=a; while(b>0){ if(b&1ll){ x=(x*y)%mod; } y=(y*y)%mod; b>>=1; } return x%mod; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219299/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" @factorial = dso_local loca...
#include <stdio.h> int main(void){ int n,m,p,i,sum,map[100]; for(;sum=0,scanf("%d %d %d",&n,&m,&p),n;){ for(i=0;i<n;i++){ scanf("%d",&map[i]); sum+=map[i]; } sum*=(100-p); if(map[m-1] == 0) printf("0\n"); else printf("%d\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219341/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 <stdbool.h> #include <stdlib.h> #include <string.h> #include <time.h> typedef long long int ll; #define mod 1000000007 #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define m0(x) memset(x,0,sizeof(x)) //qsort用(昇順,降順) int cmp_asc( const void *p, const void *q ) { return *(int*)p - ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219406/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 a=0; int b; int c; scanf("%d",&n); c=n; while(c!=0) { b=c%10; a=a*10+b; c/=10; } if(a==n) { printf("Yes"); } else { printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219457/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 pi 3.14159265; int main (){ double d,h,v,e,alan,suicme,a; scanf("%lf %lf %lf %lf",&d,&h,&v,&e); alan=(d/2)*(d/2)*pi; suicme=v/alan; if(suicme<=e) printf("NO\n"); else if(suicme>e){ a=h/((suicme)-e); printf("YES\n"); printf("%.12lf\n",a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21950/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21950/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 n, m; int a, b, c; scanf("%d", &n); a = n % 10; b = ( (n - a) % 100) / 10; c = ( ( n - 10 * b - a ) % 1000 ) / 100; m = c + 10 * b + 100 * c; if (n == m) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219543/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,N; while(scanf("%d",&N)!=EOF) { a=N%10; b=(N-N%100)/100; if(N>=100&&N<=999) { if(a<b||a>b) { printf("No\n"); } else printf("Yes\n"); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219587/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> #include <string.h> #include <limits.h> #include <stdbool.h> typedef double db; typedef int in; typedef long int li; typedef long long int lli; typedef long ld; typedef long lld; #define pi M_PI #define in scanf #define out printf #define inf INT_MAX #define re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219644/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219644/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[4]={0}; scanf("%s",a); if(a[0] == a[2]) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219688/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219688/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 ft_swap(long *a, long *b) { long tmp; tmp = *a; *a = *b; *b = tmp; } /* 昇順 */ void a_qsort(long *tab, long left, long right) { long Left = left; long Right = right; long pivot = tab[(left + right) / 2]; while (1) { while (tab[Left] < pivot) Left++; while (tab[Right] > pivot) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219730/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219730/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 compare_int(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main() { int A, B, M; int ans; int a[100001], b[100001], c[100001], d[100001]; int x, y, m; scanf("%d %d %d", &A, &B, &M); for (int e = 0; e < A;e++){ scanf("%d", &a[e]); c[e] = a[e]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219774/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 k,x; scanf("%d %d",&k,&x); for(int i=x-k+1;i<x+k;i++) printf("%d ",i); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219817/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219817/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 k,x,start=-1000000,fin=1000000; scanf("%d%d",&k,&x); if(x-k+1>start) start=x-k+1; if(x+k-1<fin) fin=x+k-1; while(start<=fin){ printf("%d ",start); start++; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219860/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 k,x,i; scanf("%d",&k); scanf("%d",&x); for(i=k-1;i>0;i--){ printf("%d ",x-i); } printf("%d ",x); for(i=k-1;i>0;i--){ x += 1; printf("%d ",x); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219903/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219903/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 K, X; scanf("%i %i", &K, &X); int min = X - K + 1; int max = X + K - 1; for ( ;min <= max; min++){ printf("%i\n", min); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219947/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219947/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 k, x; scanf("%d %d", &k, &x); for(int i = 0; i < k * 2 -1; i ++){ printf("%d ", x - k + 1 + i); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219990/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 k,x,s; int i; int b[100]; s=scanf("%d %d" ,&k, &x); if(s!=2) return -1; if(k==1) printf("%d ",x ); else{ //b[0]= x-k+1; /*for(i=1;i<2*k-1;i++){ b[i]=b[i-1]+1; }*/ for(i=x-k+1;i<=x+k-1;i++){ printf("%d ", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220031/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220031/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 K, X, i; scanf ("%d %d", &K, &X); for (i = -K+1; i < K; i++) { printf ("%d ", X + i); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220075/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220075/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,c,i; scanf("%d %d", &a, &b); c = b - a+1; b = a * 2 - 1; for(i=0;i<b;i++,c++) printf("%d ", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220118/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220118/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 k,x; scanf("%d %d",&k,&x); int i; for(i=x-k+1;i<k+x-1;i++){ printf("%d ",i); } printf("%d\n",k+x-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220161/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220161/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) { double n,m,d; double ans; scanf("%lf %lf %lf", &n, &m, &d); if(d == 0){ ans = (m-1)/n; printf("%lf", ans); } else { ans = (m-1)*2*(n-d)/n/n; printf("%lf", ans); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220211/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220211/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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left!=NIL) x=x->left; return x; } Node treeMaximum(Node x){ while(x->right!=NIL) x=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220255/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 { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ int key; struct node *parent; struct node *left; struct node *right; } ; int flag = 0; typedef struct node Node; Node *root, *NIL; void Insert(int); void Inorder(Node *); void Preorder(Node *); void Find(Node *, int); int main() { i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220299/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> #include<stdlib.h> struct Node{ int key; struct Node *right,*left,*parent; }; struct Node *root,*NIL; struct Node *find(struct Node *u,int k){ while(u!=NIL && k!=u->key){ if(k < u->key)u=u->left; else u=u->right; } return u; } void insert(int k){ struct Node ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220341/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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left != NIL) x = x->left; return x; } Node treeMaximum(Node x){ while(x->right != NI...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220385/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220385/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 { ptr, ...
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; // Node treeMinimum(Node x){ // // } Node treeSearch(Node u, int k){ if(u == NIL) return NIL; // 見つかった if(u...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220428/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220428/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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *parent; struct node *right; struct node *left; int key; }; typedef struct node *Tree; Tree t;Tree Search(Tree n,int k){ if(n == NULL || k == n->key){ return n; } if(k < n->key){ return Search(n->left,k); } else{ retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220471/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220471/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 { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Node{ int key; struct Node *right,*left,*parent; }; struct Node *find(struct Node *,int); void insert(int); void inorder(struct Node *); void preorder(struct Node *); struct Node *root,*NIL; int main(){ int n,i,x; char com[10]; scanf("%d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220514/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220514/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<string.h> typedef struct node { int key; struct node *parent; struct node *left; struct node *right; } Node; void insert(int k); void inorder(Node *x); void preorder(Node *x); Node * find(int k, Node *x); Node *root, *NIL; void insert(int k) { Node *y=NIL; N...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220558/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220558/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 k; int l; int r; } Tree; void insert(int, int); void chu(int); void sen(int); void find(int,int); Tree t[500001]; int get; int main() { char s[8]; int m; int num,t; int i; scanf("%d", &m); int count=0; for(i=0; i<m; i++){ sca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220608/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220608/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> #include<string.h> #define MAX 500001 struct node{ int parent; int left; int right; int key; }; typedef struct node Node; void insert(int); void inorder(int); void preorder(int); int find(int,int); int root=-1; Node T[MAX]; int main(){ int i, n, m; char str[10]; scanf("%d",&n); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220651/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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node *Node; Node root; void insert(int); Node find(Node,int); void preprint(); void inprint(); int main(){ int i, m, k, flag[10]; char c[7]; Node f; scanf("%d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220695/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220695/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 { ptr, ...
#include<stdio.h> #include<stdlib.h> #define NIL -1 #define MAX 500001 typedef struct{ int right; int left; int key; } Node; void Insert(Node*,int,int); void PreOrder(Node*,int); void InOrder(Node*,int); void Find(Node*,int, int); int main(void){ int i, n, k, f, count=0; char state[8]; Node T[MAX]; s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220738/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220738/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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL void inorder(Node); void prerder(Node); void insert(int); Node treeSearch(Node, int); Node root = NIL; void insert(int k){ Node y = NIL; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220781/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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeSearch(Node u, int k){ if( u==NIL || k==u->key ) return u; if( k<u->key ) return treeSearch(u->left, k); else return tr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220824/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220824/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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ int key; struct node *parent; struct node *right; struct node *left; }; typedef struct node *Node; Node T; #define NIL NULL; void Insert(int); int Find(int); void Preorder(Node); void Inorder(Node); int main() { int n,i,key; char S[7]; scanf("%d",&n); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220868/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220868/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> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL void insert(int); void inorder(Node); void preorder(Node); Node find(Node,int); Node root; void insert(int k){ Node y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220918/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220918/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 { ptr, ...
#include <stdio.h> #include <stdlib.h> struct node{ int key; struct node *left; struct node *right; }; typedef struct node *NodePointer; void in(void); NodePointer makenode(int); void insert(int, NodePointer); void preorder(NodePointer); void inorder(NodePointer); int find(int, NodePointer); NodePointer head, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220969/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220969/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<string.h> typedef struct node{ int key; struct node *p,*left,*right; }node; typedef struct node* Node; void insert(int); Node find(int); void print(Node); void inorder(Node); void preorder(Node); Node root,NIL; int main(){ int m,k,i; char string[8]; scanf("%d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221010/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221010/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> #define NIL NULL struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; Node root; void insert(Node); void inorder(Node); void preorder(Node); Node search(Node,int); int main() { int n,i,x; char m[10]; Node...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221054/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221054/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 { ptr, ...
#include <stdlib.h> #include <stdio.h> typedef struct node { int k; struct node *p; struct node *l; struct node *r; } node; static node *build_node(int k) { node *n; n = (node *) malloc(sizeof(node));...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221098/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221098/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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ } Node treeMaximum(Node x){ } Node treeSearch(Node u, int k){ if(u!=NIL){ if(k==u->key)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221140/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221140/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 { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ int key; struct node *right,*left,*parent; }; struct node *root,*NIL; struct node * find(struct node *u,int k){ while(u!=NIL &&k!=u->key){ if(k<u->key)u=u->left; else u=u->right; } return u; } void insert(int k){ struct node *y =NIL; struct node *x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221184/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221184/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, ...