Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> typedef struct { int key, id; } data; typedef struct { data obj[200001]; int size; } max_heap; void push(data x, max_heap* h) { int i = ++(h->size), j = i >> 1; data tmp; h->obj[i] = x; while (j > 0) { if (h->obj[i].key > h->obj[j].key) { tmp = h->obj[j]; h->obj[j] = h->obj[i]; h...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207988/source.c" target datalayout = "e-m:e-p270: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.max_heap = type { [...
#include<stdio.h> int main() { int a,b,c,d,i,j,flag=0,outp; scanf("%d%d%d%d",&a,&b,&c,&d); for(i=1;i<=100;i++) { for(j=1;j<=200;j++) { if(b-a+c-d==j*c-i*a) { outp=b+(i-1)*a; flag=1; break;} }if(flag==1) break; } if(flag==1) printf("%d",outp); else printf("-1"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20803/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20803/source.c" target datalayout = "e-m:e-p270: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 H[200005]; int comp(const void*a,const void*b)//用来做比较的函数。 { return *(int*)a-*(int*)b;}//从小到大排序 int main() { int N,K; scanf("%d%d",&N,&K); long long i; for(i=0;i<N;i++) { scanf("%d",&H[i]); } qsort(H,N,sizeof(int),comp);//排序 long long...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208088/source.c" target datalayout = "e-m:e-p270: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> #define MAX 200000 int asc(const void *a, const void *b) { long *A = (long *)a; long *B = (long *)b; if (*A > *B) return 1; if (*A < *B) return -1; return 0; } int main() { int n,k,i; long a[MAX]; long sum; sum=0; scanf("%d %d",&n, &k); for(i=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208130/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208130/source.c" target datalayout = "e-m:e-p270: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 <stdbool.h> #include <math.h> int main(void){ int A, B, C; scanf("%d%d%d", &A, &B, &C); if(A == B){ printf("%d\n", C); }else if(B == C){ printf("%d\n", A); }else{ printf("%d\n", B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208174/source.c" target datalayout = "e-m:e-p270: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[4]; scanf("%d%d%d",&a[0],&a[1],&a[2]); if (a[0] == a[1]) printf("%d",a[2]); else if (a[0] == a[2]) printf("%d",a[1]); else printf("%d",a[0]); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208217/source.c" target datalayout = "e-m:e-p270: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,C; scanf("%d%d%d",&A,&B,&C); if(A==B) { printf("%d\n",C); } else if(C==B){ printf("%d\n",A); } else if(A==C){ printf("%d\n",B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208260/source.c" target datalayout = "e-m:e-p270: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,c,ans; scanf("%d %d %d",&a,&b,&c); if(a == b){ ans = c; }else if(b == c){ ans = a; }else{ ans = b; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208303/source.c" target datalayout = "e-m:e-p270: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; scanf("%d %d %d",&a,&b,&c); if(a==b){ printf("%d\n",c); }else if(b==c){ printf("%d\n",a); }else{ printf("%d\n",b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208361/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208361/source.c" target datalayout = "e-m:e-p270: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,c; scanf("%d %d %d",&a,&b,&c); if(a==b) printf("%d\n",c); else if(a==c) printf("%d\n",b); else printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208404/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208404/source.c" target datalayout = "e-m:e-p270: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; scanf("%d %d %d", &a, &b, &c); if (a == b) printf("%d\n", c); else if (b == c) printf("%d\n", a); else printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208448/source.c" target datalayout = "e-m:e-p270: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,a[200010]={0},b[200010]={0},lng,num=0,flag; char s[200010]; char t[200010]; scanf("%s",s); scanf("%s",t); lng=strlen(s); for(i=0;i<lng;i++) { //printf("%d\n",i); if(a[i]==0) { num++; //printf("%d",num); j=i; while(j<lng) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208491/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208491/source.c" target datalayout = "e-m:e-p270: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 STRING_MAX (200000+1) #define MAP_SIZE 26 #define A_VALUE 97 int main(void){ char s[STRING_MAX], t[STRING_MAX]; int map1[MAP_SIZE], map2[MAP_SIZE]; for(int i = 0; i < MAP_SIZE; i++){ map1[i] = -1; map2[i] = -1; } scanf("%s\n%s", s, t); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208541/source.c" target datalayout = "e-m:e-p270: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[5],k=0,i; for(i=0;i<5;i++)scanf("%d",&n[i]); n[0]*=n[4]; if(n[2]<n[4])n[1]+=n[3]*(n[4]-n[2]); if(n[0]>n[1])n[0]=n[1]; printf("%d\n",n[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208585/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208585/source.c" target datalayout = "e-m:e-p270: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, c, d, p; int x = 0, y = 0; scanf("%d\n", &a); scanf("%d\n", &b); scanf("%d\n", &c); scanf("%d\n", &d); scanf("%d\n", &p); x = a * p; if(p <= c) { y = b; } else { y = b + d * (p - c); } if(x <= y) { printf("%d\n", x); } else { printf("%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208635/source.c" target datalayout = "e-m:e-p270: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 ; // 1L * A int B ; // kihon int C ; // seigen int D ; // +1L * D int P ; // L int X, Y ; scanf( "%d %d %d %d %d", &A, &B, &C, &D, &P ) ; X = A * P ; if( P > C ) { Y = (( P - C ) * D ) + B ; } else { Y = B ; } if( X > Y ) { printf( "%d\n", Y ) ; } if( X...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208686/source.c" target datalayout = "e-m:e-p270: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 <stdint.h> #include <math.h> #include <time.h> typedef int32_t i32; typedef int64_t i64; typedef double f64; void *const null=(void *)0; i64 const llinf=4611686018427387903LL; i64 const mod=1000000009LL; f64 const pi=3.141592653589793; f64 const rad=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208736/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @null = dso_local local_unn...
#include<stdio.h> char mat[101][101]; int left(int i, int j) { if (mat[i][j-1]=='o') return 1; else return 0; } int right(int i, int j) { if (mat[i][j+1]=='o') return 1; else return 0; } int top(int i, int j) { if (mat[i-1][j]=='o') return 1; else return 0; } int down(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20878/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mat = dso_local global [101 ...
#include <stdio.h> #include <stdlib.h> int main() { int N; scanf("%d\n", &N); int *L = malloc(sizeof(int) * N); for(int ni=0; ni<N; ni++){ scanf("%d", L+ni); } int res = 0; for(int ni=0; ni<N; ni++){ for(int nj=ni+1; nj<N; nj++){ for(int nk=nj+1; nk<N; nk++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208822/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208822/source.c" target datalayout = "e-m:e-p270: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 des(const void *a, const void *b) { return *(int *)b - *(int *)a; } int main() { int n; scanf("%d", &n); int l[n], ans = 0; for (int i=0; i<n; i++) scanf("%d", l+i); qsort(l, n, sizeof(int), des); for (int i=0; i<n-2; i++) { for (int j=i+1; j<n-1; j++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208873/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208873/source.c" target datalayout = "e-m:e-p270: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...
// ABC 143-D // 2019.10.19 bal4u #include <stdio.h> #include <stdlib.h> #if 1 int getchar_unlocked(void); #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() { // 非負整数の入力 int n = 0, c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } void Qsort(int *a, int l, in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208930/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208930/source.c" target datalayout = "e-m:e-p270: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._IO_FILE = type { i...
#include <stdio.h> int main(void){ int p[131072]={0},i,n; unsigned long long int m=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d",&p[i]); } for(i=1;i<=n;i++){ m = m + (p[i] / 2); p[i] = p[i] % 2; if(i != n && p[i] >= 1 && p[i + 1] >= 1){ p[i]--; p[i+1]--; m++; } } printf("%llu\n",m); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208989/source.c" target datalayout = "e-m:e-p270: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,c,d,r,x,y,z; scanf("%d %d %d %d",&a,&b,&c,&d); x = a-c; y = b-d; z = x*y; printf("%d",z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209038/source.c" target datalayout = "e-m:e-p270: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 h, w; if (scanf("%d%d", &H, &W) != 2) return 1; if (scanf("%d%d", &h, &w) != 2) return 1; printf("%d\n", (H - h) * (W - w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209081/source.c" target datalayout = "e-m:e-p270: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, h, w; scanf("%d %d", &H, &W); scanf("%d %d", &h, &w); printf("%d", (H - h) * (W - w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209131/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209131/source.c" target datalayout = "e-m:e-p270: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,h,w,ans; scanf("%d%d\n%d%d",&H,&W,&h,&w); ans=(H*W)-(((H*w)+(W*h))-(h*w)); printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209175/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209175/source.c" target datalayout = "e-m:e-p270: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, char **argv) { int h1, w1, h2, w2; scanf("%d %d\n", &h1, &w1); scanf("%d %d\n", &h2, &w2); printf("%d\n", (h1-h2)*(w1-w2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209218/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209218/source.c" target datalayout = "e-m:e-p270: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, h, w, all_squair, answer; scanf("%d %d", &H, &W); scanf("%d %d", &h, &w); all_squair = H * W; answer = all_squair - h * W; answer -= w * (H - h); printf("%d\n", answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209261/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209261/source.c" target datalayout = "e-m:e-p270: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 H,W,h,w,x; scanf("%d%d%d%d",&H,&W,&h,&w); x=W*H-h*W-w*(H-h); printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209311/source.c" target datalayout = "e-m:e-p270: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 H,W,h,w; scanf("%d %d", &H,&W); scanf("%d %d", &h, &w); printf("%d", H*W-(h*W+H*w-h*w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209355/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209355/source.c" target datalayout = "e-m:e-p270: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 init_z(int e){ int i; for(i = 0;i * i * i <= e;i++); return i-1; } int init_y(int e){ int i; for(i = 0;i * i <= e;i++); return i-1; } int m_min(int e){ int m = 1000000;; int z = init_z(e); for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209456/source.c" target datalayout = "e-m:e-p270: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 power( int, int ); int main( void ) { int i, power2[ 1001 ], power3[ 101 ], e, ee, x, y, z, min; for ( i = 0; i < 1001; i++ ) power2[ i ] = power( i, 2 ); for ( i = 0; i < 101; i++ ) power3[ i ] = power( i, 3 ); while ( scanf( "%d", &e ), e ) { min = e; for ( z = 0; power3[ z ] <=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209528/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209528/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> int main() { char *s = (char *)malloc(sizeof(char)*200100); fgets(s, 200100, stdin); long int len_s = strlen(s); if (s[len_s-1] == '\n') { len_s--; } long long int ans = 0; long int *co...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209571/source.c" target datalayout = "e-m:e-p270: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...
#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <float.h> #pragma region 定義 #define i_cin(X) scanf("%d", &X) #define i_cin2(X,Y) scanf("%d %d",&X,&Y) #define i_cin4(X,Y,Z,W) scanf("%d %d %d %d",&X,&Y,&Z,&W) #define i_cin3(X,Y,Z) scanf("%d %d %d",&X,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209614/source.c" target datalayout = "e-m:e-p270: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 n, i, j, flag; char S[201]; int main(){ scanf("%s", S); while(S[n]){n++;} i=(n>>1)-1; while(1){ flag=1; for(j=0; j<i; j++){ if(S[j] != S[j+i]){flag=0; break;} } if(flag){break;} i--; } printf("%d\n", i*2); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209672/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209672/source.c" target datalayout = "e-m:e-p270: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[200]; scanf("%s",s); int n = strlen(s); for(int i = n-2; i; i-=2){ if(strncmp(s, s+i/2, i/2) ==0){ printf("%d\n" ,i); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209715/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209715/source.c" target datalayout = "e-m:e-p270: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> int main(void) { char s[200]; scanf("%s", s); int len = strlen(s); char a[100]; char b[100]; int counter = 0; while (true) { counter += 2; strncpy(a,s,(len - counter)/2); a[(len - counter)/2] = '\0'; st...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209759/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209759/source.c" target datalayout = "e-m:e-p270: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 det(A) (A.a*A.d-A.b*A.c) /* A Point In A Triangle‚Ì‚Ü‚Ü */ struct matrix{ double a, b, c, d; }; struct vector{ double a, b; }; struct vector multi(struct matrix x, struct vector y){ struct vector res; res.a=x.a*y.a+x.b*y.b, res.b=x.c*y.a+x.d*y.b; return res; } struct matrix inv(struct...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209816/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209816/source.c" target datalayout = "e-m:e-p270: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.matrix = type { dou...
#include<stdio.h> int main() { long long int c=0,t,x,y; scanf("%I64d%I64d",&x,&y); while(y!=0&&y!=1) { c+=x/y; t=x; x=y; y=t%y; } if(y==1) c+=x; printf("%I64d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20986/source.c" target datalayout = "e-m:e-p270: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 ...
// AOJ 0604: Take the 'IOI' train // 2017.12.5 bal4u@uu #include <stdio.h> #include <string.h> char s[2002], t[2002]; int dp[2][2002][2002]; int main() { int n, m, i, j, ans; char *p; fgets(s, 20, stdin); sscanf(s, "%d%d", &m, &n); fgets(s, 2002, stdin); fgets(t, 2002, stdin); for (p = s; *p > ' '; p++) *p ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209902/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209902/source.c" target datalayout = "e-m:e-p270: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 [2002...
#include<stdio.h> int main () { int n, m; scanf("%d %d", &n, &m); char s[n]; scanf("%s", s); if(s[m-1] >= 'A' && s[m-1] <= 'Z') { s[m-1] += 32; } else { s[m-1] -= 32; } printf("%s", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209946/source.c" target datalayout = "e-m:e-p270: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("%i", &n); int Pole[n]; int i; int maxi=0; for(i=0;i<n;i++){ scanf("%i", &Pole[i]); if(Pole[i]>maxi) maxi=Pole[i]; } printf("%i\n", maxi); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20999/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20999/source.c" target datalayout = "e-m:e-p270: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> char in[55]; int main(){ int a; int b; scanf("%d%d", &a, &b); scanf("%s",in); in[b-1]+=32; printf("%s\n",in); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210030/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210030/source.c" target datalayout = "e-m:e-p270: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,k; scanf("%d%d",&n,&k); char s[n+1]; scanf("%s",s); s[k-1] = s[k-1]- 'A' + 'a'; printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210074/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210074/source.c" target datalayout = "e-m:e-p270: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, K; char S[50]; scanf("%d %d", &N, &K); scanf("%s", S); S[K - 1] = S[K -1] + 32; printf("%s", S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210117/source.c" target datalayout = "e-m:e-p270: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,K; char S[50]; scanf("%d%d",&N,&K); scanf("%s",S); if(S[K-1]=='A'){ S[K-1]='a'; }else if(S[K-1]=='B'){ S[K-1]='b'; }else if(S[K-1]=='C'){ S[K-1]='c'; } printf("%s\n",S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210160/source.c" target datalayout = "e-m:e-p270: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 <stdbool.h> #include <string.h> #include <ctype.h> void main(void) { int N, K; char *str; scanf("%d %d", &N, &K); str = (char*)malloc(N+1); scanf("%s", str); str[K-1] = tolower(str[K-1]); printf("%s\n", str); free(str); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210210/source.c" target datalayout = "e-m:e-p270: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,k; scanf("%d",&n); scanf("%d",&k); char s[n]; scanf("%s",s); if(s[k-1]=='A'){ s[k-1]='a'; } else if(s[k-1]=='B'){ s[k-1]='b'; } else if(s[k-1]=='C'){ s[k-1]='c'; } printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210254/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210254/source.c" target datalayout = "e-m:e-p270: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 n; int k; char s[50]; scanf("%d %d", &n, &k); scanf("%s", s); s[k-1] += 32; printf("%s", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210298/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210298/source.c" target datalayout = "e-m:e-p270: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...
//changing a charactor #include<stdio.h> #define NUM 50 int main(){ int n,k; char s[NUM]; //文字数 変換する文字 scanf("%d %d",&n,&k); scanf("%s",s); for(int i=0;i<n;i++){ if(i==k-1){ s[i]+=0x20; } } printf("%s",s); putchar('\n'); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210340/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210340/source.c" target datalayout = "e-m:e-p270: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 main() { int i, j; char str[100]; int N; int K; scanf("%d %d ", &N, &K); scanf("%[^\n]%*c", str); if(str[K-1] == 'A'){ str[K-1] = 'a'; } else if(str[K-1] == 'B'){ str[K-1] = 'b'; } else if(str[K-1] == 'C'...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210384/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210384/source.c" target datalayout = "e-m:e-p270: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, k; char str[100]; scanf("%d %d", &n, &k); scanf("%s", str); str[k - 1] = str[k - 1] - 'A' + 'a'; printf("%s\n", str); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210427/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210427/source.c" target datalayout = "e-m:e-p270: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 s; long int ans[2001]={0,0,0,1}; scanf("%d",&s); for(int i=4;i<=s;i++) { ans[i]=(ans[i-1]+ans[i-3])%(1000000007); } printf("%ld\n",ans[s]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210470/source.c" target datalayout = "e-m:e-p270: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> double max(double a, double b) { if (a > b){ return (a); } return (b); } int main(void) { int i, j, k; int n, m; double gr[100][100]; double dp[100][100]; double ans; int upd; while (1){ scanf("%d%d", &n, &m); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210513/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210513/source.c" target datalayout = "e-m:e-p270: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...
// AOJ 1248: The Balance // 2017.12.17 bal4u@uu #include <stdio.h> #include <math.h> int a, b; int ansx, ansy; void answer(int x, int y) { if (x + y < ansx + ansy) ansx = x, ansy = y; else if (a*x + b*y < a*ansx + b*ansy) ansx = x, ansy = y; } int main() { int d, t, x, ax, lim; while(scanf("%d%d%d", &a, &b, &d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210564/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ansx = dso_local local_unn...
/*ex5-4 ryo_1129*/ #include <stdio.h> int main(void){ //入力の文字列は10文字以下なので\0を含めて11で定義する char str[11],*ptr; //ACGT配列の長さと、最長の長さをいれる変数 int length_counter=0,max_length=0; scanf("%s",str); ptr = str; while(*ptr){ //ACTGが続く間はlength_counterに部分文字列の長さを記録する if(*ptr=='A' || *ptr=='G' ||...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210614/source.c" target datalayout = "e-m:e-p270: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...
/* ex 5_4 ruuu0048 */ #include <stdio.h> int main(void){ //10文字以下なので最大の要素数は\0を含めて11 char word[11],*ptr; //count:数える変数 count_max:最大のACGT文字列の長さ int count=0,count_max=0; scanf("%s", &word[0]); //文字列を入力 ptr = &word[0]; //文字列の先頭のアドレスを代入 while(*ptr){ //文字列の最後まで繰り返す if(*ptr=='A' ||...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210658/source.c" target datalayout = "e-m:e-p270: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 c,i,j,l,max=0; char s[11]; scanf("%s",s); l=strlen(s); for(i=0;i<l;i++){ if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T'){ c=1; for(j=i+1;j<l;j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210700/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210700/source.c" target datalayout = "e-m:e-p270: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 c[10]; int len = 0,max = 0,n; scanf("%s",c); for(int i = 0;c[i]!= '\0';i++){ if(c[i] == 'A'||c[i] == 'T'||c[i] == 'G'||c[i] == 'C'){ len = 1; n = i + 1; while(c[n]!= '\0'&&(c[n] == 'A'||c[n] == 'T'||c[n] == 'G'||c[n] == 'C'))len++,n++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210744/source.c" target datalayout = "e-m:e-p270: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,a,max; char v[10]; a=0; max=0; scanf("%s", &v); for(i=0;i<=10;i++){ if(v[i]=='A'||v[i]=='C'||v[i]=='G'||v[i]=='T'){ a+=1; } else{ a=0; } if(max<a) max=a; } printf("%d",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210788/source.c" target datalayout = "e-m:e-p270: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 S[10]; int i; int a=0; int b=0; int count=0; int nagasa=0; int x=0; scanf("%s",S); for(i=0;i<11;i++){ if(count==0){ if(S[i]=='A'||S[i]=='T'||S[i]=='C'||S[i]=='G'){ a=i; count++; } } else if(count==1){ if(S[i]!='A'&&S[i]!='T'&&S[i]!='C'&&S[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210838/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210838/source.c" target datalayout = "e-m:e-p270: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 isBase(char a); int main() { int i, cnt, max; char s[11]; scanf("%s", s); cnt = 0; max = 0; for (i = 0; i < strlen(s); i++) { if (isBase(s[i])) cnt++; else if (cnt) { if (max < cnt) max = cnt; cnt = 0; } } if (max < cnt) max = cnt; printf("%d", max); retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210881/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210881/source.c" target datalayout = "e-m:e-p270: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> static int max( int a, int b ); static int isATCG( int ch ); static int cntATCGstr( char *str ); void main() { char str[10+1]; int len; int strlen_max; scanf( "%s", str ); len = strlen( str ); strlen_max = 0; for( int i = 0; i < len; i++ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_210931/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_210931/source.c" target datalayout = "e-m:e-p270: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 n,i,A[100004],max=0; scanf("%lld",&n); scanf("%lld",&A[0]); max=A[0]; for(i=1;i<n;i++) { scanf("%lld",&A[i]); if(max<A[i]) max=A[i]; } printf("%lld",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21099/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21099/source.c" target datalayout = "e-m:e-p270: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){ char s[20]; int i,j,ans=0,cnt; scanf("%s",s); for(i=0;i<strlen(s);i++){ cnt=0; if(s[i]=='A' || s[i]=='T' || s[i]=='C' || s[i]=='G'){ for(j=i;;j++){ if(!(s[j]=='A' || s[j]=='T' || s[j]=='C' || s[j]=='G')) break; cnt++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211031/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211031/source.c" target datalayout = "e-m:e-p270: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> #include <stdbool.h> typedef long long ll; #define rep(i,n) for(ll i=0; i<(ll)(n); i++) #define max(l,r) ((l)>(r)?l:r) #define min(l,r) ((l)<(r)?l:r) #define swap(l,r) {ll tp=l;l=r;r=tp;} const ll MOD = 1000000007; int upcmpii(const void *a, c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211082/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211082/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MOD = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> int min(int a,int b){ if(a>=b) return b; else return a; } void _mode(int a, int b, int max, int *A, int *mode, int *count){ int *num; num=(int*)malloc((max+1)*sizeof(int)); for(int i=0;i<=max;i++) num[i]=0; for(int i=a;i<=b;i++){ num[A[i]]++; } for(int i=0;i<...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211125/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211125/source.c" target datalayout = "e-m:e-p270: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...
/* A3114:Min Element */ #include <stdio.h> int main() { int i,v,minv,ret,n; scanf("%d",&n); scanf("%d",&minv); for(i=1,ret=0;i<n;i++) { scanf("%d",&v); if(v<minv) { ret=i; minv=v; } } printf("%d\n",ret+1); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211169/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211169/source.c" target datalayout = "e-m:e-p270: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 ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)((n>>m)&1) int upll(const void*a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211211/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211211/source.c" target datalayout = "e-m:e-p270: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...
#if 0 cat <<EOF >mistaken-paste #endif // thanks for @rsk0315_h4x #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211255/source.c" target datalayout = "e-m:e-p270: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.hwll = type { i64, ...
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #define MOD 1000000009 #define MAX(a,b) (a>b?a:b) #define MAX3(a,b,c) MAX(a,MAX(b,c)) #define MIN(a,b) (a<b?a:b) #define MIN3(a,b,c) MIN(a, MIN(b,c)) typedef long long lli; typedef unsigned short int usi; // 昇順 int cmp(const void *a, const vo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211299/source.c" target datalayout = "e-m:e-p270: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 ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upll(const vo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211341/source.c" target datalayout = "e-m:e-p270: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 cnt[10000], s[10000]; int main() { int i, j, t, n, k, a, len; scanf("%d", &t); while(t--){ scanf("%d%d", &n, &k); len = 0; for(i = 1; i <= 10000; i++) cnt[i] = 0; for(i = 1; i <= n; i++){ scanf("%d", &a); if(cnt[a] == 0){ cnt[a] = 1; s[++len] = a; } } if(len > k)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2114/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #define ll long long int int main(void){ ll a,b,c,k,ans; scanf("%lld%lld%lld%lld",&a,&b,&c,&k); if(k%2==0)ans=a-b; else ans=b-a; printf("%lld",ans); if(ans>1e18) printf("Unfair"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211464/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211464/source.c" target datalayout = "e-m:e-p270: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 <inttypes.h> #include <stdint.h> #include <string.h> #include <wchar.h> int main(void) { int64_t A, B, C, K; scanf("%"PRId64"\n%"PRId64" %"PRId64" %"PRId64, &A, &B, &C, &K); printf("%"PRId64, (K % 2 == 0) ? A - B : B - A); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211514/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211514/source.c" target datalayout = "e-m:e-p270: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) { if(a == 0) { return b; } return gcd(b%a,a); } int main() { int T; scanf("%d",&T); while(T--) { int K; scanf("%d",&K); if(K== 0 || K == 100) { printf("1\n"); continue; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21158/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21158/source.c" target datalayout = "e-m:e-p270: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> int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int n,x,a[100],i,j,ans = 0; scanf("%d %d",&n,&x); for (i = 0; i < n; i++) { scanf("%d",&a[i]); } qsort(a,n,sizeof(int),asc); for (i = 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211622/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211622/source.c" target datalayout = "e-m:e-p270: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 n,x,a[100],i,j,t; scanf("%ld %ld",&n,&x); for (i=0;i<n;i++) scanf("%ld",&a[i]); for (i=0;i<n;i++) { for (j=i+1;j<n;j++) if (a[i]>a[j]) { t=a[i];a[i]=a[j];a[j]=t; } x-=a[i]; if (x<0) break; } if (x>0 &&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211666/source.c" target datalayout = "e-m:e-p270: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,a,i,j=1,d[10]={}; scanf("%d %d",&m,&n); for(i=0;i<n;i++){ scanf("%d",&a); d[a]=1; } for(i=m;j;i++){ for(j=i;j;j/=10){ if(d[j%10])break; } } printf("%d\n",i-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211709/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211709/source.c" target datalayout = "e-m:e-p270: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)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211752/source.c" target datalayout = "e-m:e-p270: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 *root, *NIL; void insert(int k){ struct Node *y = NIL; struct Node *x = root; struct Node *z; z = (struct Node *)malloc(sizeof(struct Node)); z->key = k; z->left = NIL;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211796/source.c" target datalayout = "e-m:e-p270: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 *p; 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){ } Node treeSuccessor(Node x){ } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211839/source.c" target datalayout = "e-m:e-p270: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> int gcd(int a, int b){ int tem; if (a > b){ while(b !=0){ tem = b; b = a%b; a = tem; } return a; } else if (b > a){ while(a !=0){ tem = a; a = b%a; b = tem; } return b; } else return b; } int main(){ int t; scanf("%d",&t); for(int i=0;i<t;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21189/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21189/source.c" target datalayout = "e-m:e-p270: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> typedef struct{ int a,b,c; }Node; void insert(int, int); void inParse(int); void preParse(int); Node A[500001]; int main(void) { char s[8]; int m; int num,count=0; int i; scanf("%d", &m); for(i=0; i<m; i++){ scanf("%s", &s); if(s[0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211932/source.c" target datalayout = "e-m:e-p270: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 *r; struct node *l; struct node *p; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->l != NIL){ x = x->l; } return x; } Node treeSearch(Node u, int k){ if(u == NIL || k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_211998/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_211998/source.c" target datalayout = "e-m:e-p270: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> int ary[9] = {1,2,4,5,10,20,25,50,100} ; int main (void) { int testcases ; scanf ("%d", &testcases) ; int i=0 , res[testcases] ; for ( i=0 ; i<testcases ; ++i ) { int k, facs, j=8 ; scanf("%d", &k) ; res[i] = 100 ; while (j+1) { if ( k%ary[j]==0 ) { res[i] /= ary[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21204/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21204/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ary = dso_local local_unname...
#include<stdio.h> #include<stdlib.h> #define NIL NULL struct node { int key; struct node *left; struct node *right; struct node *parent; }; typedef struct node* Node; Node root; void insert(int); void inorder(Node); void preorder(Node); int main(){ int i,n,x; char c[5]; scanf("%d",&n); for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212090/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212090/source.c" target datalayout = "e-m:e-p270: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 #define N 10000 struct node{ int key; struct node *p,*l,*r; }; typedef struct node *Node; Node root; void insert(int); void printa(Node); void printb(Node); int main() { int m,i,p; char ip[10]; scanf("%d",&m); for(i=0;i<m;i++){ scanf("%s",ip); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212133/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212133/source.c" target datalayout = "e-m:e-p270: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> struct node{ struct node *left; struct node *right; struct node *parent; int key; }; struct node *T; void Insert(int); void Inorder(struct node*); void Preorder(struct node*); int main(){ int n, i, key; char func[6]; T = (struct node *)malloc(sizeof(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212191/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212191/source.c" target datalayout = "e-m:e-p270: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; void treeD(Node); void treeInsert(int); void inorder(Node); void preorder(Node); Node treeMin(Node); Node treeS(Node,int); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212241/source.c" target datalayout = "e-m:e-p270: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 treeMinimum(Node x){ while(x->left!=NIL){ x = x->left; return x; } } Node treeMaximum(Node x){ while(x->righ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212292/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212292/source.c" target datalayout = "e-m:e-p270: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> // printf(), scanf() #define MAX_N 500000 typedef struct node_tbl { int key; int parent; int left; int right; } node; const int nil = -1; node t[MAX_N + 1]; int root; int ix; void insert(int k) { int y = nil; int x = root; int z = ix++; t[z].key = k; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212335/source.c" target datalayout = "e-m:e-p270: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_tbl = type { i...
#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=NIL; /* Node treeMinimum(Node x){ } Node treeSearch(Node u, int k){ if ( } Node treeSuccessor(Node x){ } void treeDele...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212386/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212386/source.c" target datalayout = "e-m:e-p270: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 treeMinimum(Node x){ while(x->left!=NIL){ x=x->left; } return x; } Node treeSearch(Node u, int k){ if(u==NIL |...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212436/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212436/source.c" target datalayout = "e-m:e-p270: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> int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } int reduce(int x, int y) { int d; d = gcd(x, y); x = x / d; y = y / d; return (y); } int main() { int tc; scanf("%d",&tc); while(tc--) { int n; scanf("%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21248/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21248/source.c" target datalayout = "e-m:e-p270: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> #define NIL NULL struct node{ int key; struct node *p,*l,*r; }; typedef struct node * Node; Node root; void pre(Node u){ if (u == NIL) return; printf(" %d",u->key); pre(u->l); pre(u->r); } void in(Node u){ if (u == NIL) return; in(u->l); pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212522/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212522/source.c" target datalayout = "e-m:e-p270: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; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NI...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212566/source.c" target datalayout = "e-m:e-p270: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; Node root = NULL; void insert(int k) { Node x = root; Node y = NULL; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NULL; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212609/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212609/source.c" target datalayout = "e-m:e-p270: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; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212652/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212652/source.c" target datalayout = "e-m:e-p270: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 *root, *NIL; void insert(int k){ struct Node *y = NIL; struct Node *x =root; struct Node *z; z = malloc(sizeof(struct Node)); z->key = k; z->left = NIL; z->right ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_212696/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_212696/source.c" target datalayout = "e-m:e-p270: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, ...