Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> int main(void){ // Your code here! int N,D; scanf("%d %d",&N,&D); printf("%d\n",(N%(2*D+1) == 0)? N/(2*D+1):N/(2*D+1)+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204769/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204769/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 = 0; int d = 0; int a; int b; scanf("%d%d",&n,&d); for (a=0;(2*d+1)*a<n;a++){ b=a; } printf("%d",b+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204811/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204811/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int N; int D; scanf("%d", &N); scanf("%d", &D); if(N%(2*D+1) == 0){ printf("%d", N / (2*D+1)); } else{ printf("%d\n",(N / (2*D+1)) +1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204855/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int n,d,x; scanf("%d%d",&n,&d); if(n%(2*d+1)==0){ x=n/(2*d+1); }else{ x=n/(2*d+1)+1; } printf("%d",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204899/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204899/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, d; scanf("%d%d", &n, &d); d = 2*d + 1; n = (n+d-1)/d; printf("%d\n", n); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204941/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204941/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,A; int x; scanf("%d%d",&N,&A); x=N%500; if(A>=x) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204985/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,A; scanf("%d",&N); scanf("%d",&A); if(N%500<=A){ printf("Yes"); } else{ printf("No"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205027/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,n,b,t; scanf("%d %d",&n,&a); b=n/500; t=n-(b*500); if(t <= a){ printf("Yes"); } else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205070/source.c" target datalayout = "e-m:e-p270:32:32-p271: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=0; int n=0; int temp=0; scanf("%d",&n); scanf("%d",&a); temp=n/500; n=n-500*temp; if(n<=a){ printf("Yes\n"); } else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205113/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, A, F, QA; scanf("%d", &N); scanf("%d", &A); F = 500; QA = N % F; if(QA <= A){ printf("Yes"); } else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205171/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 , A , rslt1 ; scanf("%d%d", &N , &A) ; rslt1 = N%500 ; if (rslt1<=A){ printf("Yes\n") ; } else { printf("No\n") ; } return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205221/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,a; scanf("%d%d",&n,&a); if(n%500<=a) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205272/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,n,h; scanf("%d",&n); scanf("%d",&h); n=n%500; if(n>h){ printf("No"); return 0; } printf("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205322/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,d[101],min=100,i; char s[101],ans[201]; scanf("%d",&n); scanf("%s",s); d[0]=0; for(i=0;i<n;i++){ if(s[i]=='(') d[i+1]=d[i]+1; else d[i+1]=d[i]-1; if(min>d[i+1]) min=d[i+1]; } for(i=0;i<-min;i++) printf("("); printf("%s",s); for(i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205366/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <stdint.h> #include <stdlib.h> int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */ int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */ #define MAXN (200000) #define MOD (1000000007) char ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205409/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 && B==C){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205452/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; if(scanf("%d %d %d", &a, &b, &c) != 3){ return 0; } if((a == b) && (a == c)){ printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205496/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 && b==c) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205539/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef long long ll; char lowcmp[26]="abcdefghijklmnopqrstuvwxyz"; char upcmp[26]="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; long long mod=1000000007; long long max(long long A,long long B){ return A>B?A:B; } long long min(long ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @lowcmp = dso_local local_u...
#include <stdio.h> int main(){ char s[10+1]={0}; scanf("%s",s); s[3]='8'; printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205632/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; char str[16]; fgets(str,sizeof(str),stdin); str[3] = '8'; for(i=0;i<10;i++) { printf("%c",str[i]); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205698/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205698/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> int main(){ int month,day; scanf("2017/%02d/%02d",&month,&day); printf("2018/%02d/%02d\n",month,day); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205849/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d",&n); if(n==1 || n==2) printf("-1"); else { for(i=n;i>=1;i--) printf("%d ",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2059/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2059/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<string.h> int main(){ int n; scanf("%d",&n); while(n--){ unsigned long long a,b; scanf("%I64d%I64d",&a,&b); printf("%I64d\n",b+(a-1)*9); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20595/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int c, a, n, q, t; scanf("%d", &q); while(q--){ scanf("%d%d%d", &c, &a, &n); t = 0; while(1){ if(c && a && n){ --c; --a; --n; t++;} else if(c >= 2 && a){ c -= 2; --a; t++;} else if(c >= 3){ c-=3; t++;} else break; } printf("%d\n", t); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206006/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 DIGIT 1000000 int prime[DIGIT]; void eratosthenes(void) { int i, j; prime[1] = 1; for(i = 2; i * i < DIGIT + 1; i++ ) { for(j = i; j * i < DIGIT; j++ ) { prime[i * j] = 1; } } } int main(void) { int a, d, n, i, count, num; eratosthenes();...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206064/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @prime = dso_local local_un...
#include <stdio.h> #define IN_MAX 999999 char table[IN_MAX+1]; void createtable(){ //0->prime 1->not prime int i=2,j; table[0]=table[1]=1; for(;i<=IN_MAX;i++) if(!table[i]) for(j=i*2;j<=IN_MAX;j+=i) table[j]=1; } int main(){ int a,d,n,c,x; createtable(); for(;;){ c=0; scanf("%d%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206107/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @table = dso_local local_un...
#include <stdio.h> #include <string.h> int main(void) { int i,sum,g,p,N,flag; char s[100003]; scanf("%s",s); N=strlen(s); g=0; p=0; for(i=0;i<=N-1;i++){ if(s[i]=='g'){ g++;} else p++;} printf("%d",N/2-p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206150/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 2660: Sigma // 2018.1.25 bal4u #include <stdio.h> #include <string.h> #define INF 0x10101010 int s[302]; int dp[302][302]; //#define getchar_unlocked() getchar() int in() { int n = 0; int c = getchar_unlocked(); do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked(); while (c >= '0'); return n; } in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206194/source.c" target datalayout = "e-m:e-p270: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() { int l; long double a, b, c; scanf("%d", &l); a = (long double)l / 3.0; b = (long double)l / 3.0; c = (long double)l - (a + b); printf("%llf", a * b * c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206244/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206244/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { double L,v; scanf("%lf",&L); v=pow((L/3),3); printf("%.12lf\n",v); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206288/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ double L; scanf("%lf", &L); printf("%lf\n", L*L*L/27.0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206330/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 cmp(const void *n1, const void *n2) { return *(int *)n1 - *(int *)n2; } int main(void) { double sumLength; scanf("%lf", &sumLength); double volume = pow((sumLength / 3), 3); printf("%lf", volume); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206374/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206374/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { double x,a,volume; scanf("%lf",&x); a=x/3.00; volume=a*a*a; printf("%.12lf\n",volume); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206417/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206417/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { double n,s,a; scanf("%lf",&n); a = n / 3.0; s = a * a * a; printf("%.12lf\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206460/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206460/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { double L; scanf("%lf",&L); printf("%lf\n",(L/3.0)*(L/3.0)*(L/3.0)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206518/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 rep(i,l,n) for(int (i)=(l);(i)<(n);(i)++) #define min(a,b) (a)<(b)?(a):(b) #define max(a,b) (a)>(b)?(a):(b) int kaibun(char*,int,int); int main(){ long double L; scanf("%Lf",&L); printf("%Lf",L*L*L/27); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206561/source.c" target datalayout = "e-m:e-p270:32:32-p271: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_206604/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206604/source.c" target datalayout = "e-m:e-p270: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){ // 小さい方へどんどん降りていく while(x->left != NIL) x = x->left; return x; } Node tree...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206648/source.c" target datalayout = "e-m:e-p270: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> typedef struct node{ int key; struct node *p,*left,*right; }node; typedef struct node* Node; void insert(int); Node find(int); void delNode(Node); void inorder(Node); void preorder(Node); Node minimum(Node); Node successor(Node); Node root,NIL; int main(){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206691/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206691/source.c" target datalayout = "e-m:e-p270: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, ...
# define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> typedef struct node { int key; struct node *p_left; struct node *p_right; struct node *p_parent; }NODE; NODE *insert(int value, NODE *p_root); /* ?????\ */ void inorderTreeWalk(NODE *p_node); /* ??????????????? */ void preorderTreeWalk(NODE *p_...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206734/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206734/source.c" target datalayout = "e-m:e-p270: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; Node minimum(Node x){ while(x->left!=NIL) x=x->left; return x; } Node find(Node u,int k){ if(u==NIL||u->key==k) retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206792/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206792/source.c" target datalayout = "e-m:e-p270: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 min( int a, int b, int c) { int m = a; if (m > b) m = b; if (m > c) m = c; return m; } int main() { int n; scanf("%d",&n); int a[5000],b[5000],c[5000],d; int i,k=0,l=0,m=0; for(i=0;i<n;i++) { scanf("%d",&d); if(d==1) { a[k++]=i+1; } if(d==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20685/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> struct node{ struct node *ri; struct node *le; struct node *pa; int key; }; typedef struct node * Node; Node ne; Node treeMinimum(Node ); Node treeSearch(Node,int ); Node treeSuccessor(Node ); void insert(int); void inorder(Node); void preorder(Node); void treeDelete(Node...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206893/source.c" target datalayout = "e-m:e-p270: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||k==u...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206943/source.c" target datalayout = "e-m:e-p270: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 main() { int n,i,flag=0; scanf("%d",&n); int t[n]; for(i=0;i<n;i++) scanf("%d",&t[i]); /* for(i=0;i<n;i++) { if(t[i]!=1) continue; else { flag = 1; break; } } if(flag==0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20700/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20700/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define NIL NULL typedef struct node{ int key; struct node *p; struct node *l; struct node *r; }Node; Node *T; void insert(int); void print(Node *); void inorder(Node *); void preorder(Node *); Node *find(Node *,int); void Delete(Node *); Node *TreeSuccessor(Node *); No...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207043/source.c" target datalayout = "e-m:e-p270: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 !...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207087/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207087/source.c" target datalayout = "e-m:e-p270: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 *l,*r,*p; }; void insert(int ); void inorder(struct Node *); void preorder(struct Node *); struct Node *find(struct Node *,int); struct Node *treeMinimum(struct Node *); struct Node *treeSuccessor(struct Node *); void treeD...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207137/source.c" target datalayout = "e-m:e-p270: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{ int key; struct Node *right,*left,*parent; }; struct Node *root,*NIL; struct Node *treeMin(struct Node *x){ while(x->left!=NIL)x=x->left; return x; } 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...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207180/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207180/source.c" target datalayout = "e-m:e-p270: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->righ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207223/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207223/source.c" target datalayout = "e-m:e-p270: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<string.h> int main(void) { int i,flg,n; char s[11],t[12]; scanf("%s %s",s,t); n=strlen(s); flg=0; for (i=0;i<n;i++){ if(s[i]!=t[i]){ flg=1; } } if (flg==1){ printf("No\n"); } else { printf("Yes\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207281/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 c1[12]; char c2[12]; scanf("%s%s",c1,c2); for(int i = 0; i < 12; ++i){ if(c1[i] == '\0') break; if(c1[i] != c2[i]){ printf("No\n"); return 0; } } printf("Yes\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207382/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207382/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 main(){ char s[16]; scanf("%s",&s); char t[16]; scanf("%s",&t); int tf=0; int i; for(i=0;i<16;i++){ if(s[i]=='\0'){ if(t[i]!='\0'&&t[i+1]=='\0'){ tf=1; break; }else{ tf=0; break; } }else if(s[i]!=t[i]){ tf=0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207432/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207432/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,b,n=0,h,w,j,i,c=0; char x[100],y[100]; scanf("%s%s",x,y); y[strlen(x)]='\0'; if(strcmp(x,y)==0){printf("Yes\n");} else{printf("No\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207476/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207476/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[15],t[15]; char cmpt[15]; int lens,lent; scanf("%s", s); scanf("%s", t); lens = strlen(s); lent = strlen(t); strncpy(cmpt,t,lent-1); cmpt[lent-1] = '\0'; if(strcmp(s,cmpt) == 0){ printf("Yes\n"); } else { printf("No\n"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ char s[11],t[12]; scanf("%s",s); scanf("%s",t); if(strncmp(s,t,strlen(s)) == 0) printf("Yes"); else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207577/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 correct (long long x, long long y, long long size_x, long long size_y) { return (1 <= x) && (x <= size_x) && (1 <= y) && (y <= size_y); } long long min (long long x, long long y) { return x < y ? x : y; } int main (void) { long long size_x, size_y, x, y, n; scanf ("%I64d%I64d%I...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20762/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ char s[15],t[15]; int i,j,k; scanf("%s",s); scanf("%s",t); for(i=0; s[i]!='\0'; ++i); for(j=0; t[j]!='\0'; ++j); if(i==j-1){ for(k=0;k<i;k++){ if(s[k]!=t[k]){ printf("No\n"); return 0; } } } if(i!=j-1){ printf("No\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207663/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef long long ll; int main(){ char s[15]; char t[15]; int i,n; int flag = 0; scanf("%s %s", s, t); n = strlen(s); for(i = 0;i < 26;i++){ s[n] = 'a' + i; if(strncmp(s,t,n + 1) == 0) flag = 1; } if(flag) printf("Y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> long long int abso(long long int a) { if(a<0) return -1*a; return a; } int main() { long long int n,m,xc,yc,dx[10000],dy[10000],ans=0,temp1,temp2,count,x1,x2,min; int i,j,k; scanf("%I64d %I64d",&n,&m); scanf("%I64d %I64d",&xc,&yc); scanf("%d",&k); for(i=0;i<k;i++) scanf("%I64d %I64d",&dx[i],&dy[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20775/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <limits.h> #include <stdbool.h> int main(){ int a,b,c,d; int scream[500000]={0}; scanf("%d%d%d%d",&a,&b,&c,&d); int i=0; while(b+a*i<500000){ scream[b+a*i]=1; i++; } i=0; while(d+c*i<500000){ if(scre...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20780/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20780/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ int a[13],i,b,c,d,e,f,two=0,three=0,x=13,four=0; while(scanf("%d,%d,%d,%d,%d\n",&b,&c,&d,&e,&f)!=EOF){ for(i=0;i<13;i++){ a[i]=0; } a[b-1]++; if(x>b-1){ x=b-1; } a[c-1]++; if(x>c-1){ x=c-1; } a[d-1]++; if(x>d-1){ x=d-1; } a[e-1]++; if(x>e-1){ x=e-1; } a[f-1]++; if(x>f-1){ x=f-1; } for(i=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207843/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207843/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; long int count = 0,a = 0; scanf("%d",&k); if(k % 2 == 0 || k % 5 == 0) { printf("-1"); return 0 ; } while(1) { a = (a * 10 + 7) % k; count++; if(a == 0) { printf("%ld\n",count); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207894/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void){ unsigned int m; scanf("%d", &m); if(m%2==0||m%5==0){ printf("-1"); return 0; } unsigned int i,k,s; for(i=0;;i++){ if(i==0){ s=7%m; k=7; }else{ k*=10; k%=m; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207944/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207944/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(void) { long int N, K, i, t=0; scanf("%ld %ld", &N, &K); int H[N]; for(i=0; i<N; i++){ scanf("%d", &H[i]); } if(N <= K) { printf("0\n"); retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_207995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_207995/source.c" target datalayout = "e-m:e-p270:32:32-p271: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_ints(const void* a, const void* b) { int arg1 = *(const int*)a; int arg2 = *(const int*)b; if (arg1 < arg2) return -1; if (arg1 > arg2) return 1; return 0; } int main(void) { int N; int K; int *H; long long int sum; int num; in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208037/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define N 200000 int compare(const void *a, const void *b) { int ia = *(int *) a; int ib = *(int *) b; return ia - ib; } int main() { static int hh[N]; int n, k, i; long long ans; scanf("%d%d", &n, &k); for (i = 0; i < n; i++) scanf("%d", &hh[i]); qsort(hh, n, size...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208095/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.hh = internal global ...
#include <stdio.h> #include <stdlib.h> int comp(const void *a, const void *b){ return *(int*)a - *(int*)b; } int main(void){ int n, k; scanf("%d%d", &n, &k); int h[n]; for(int i = 0; i < n; i++){ scanf("%d", &h[i]); } qsort(h, n, sizeof(int), comp); long long int sum = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208138/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208138/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d %d %d",&A,&B,&C); if(A==B) D=C; else if(A==C) D=B; else D=A; printf("%d\n",D); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208181/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208181/source.c" target datalayout = "e-m:e-p270:32:32-p271: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",c); else if(a==c) printf("%d",b); else printf("%d",a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208224/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208224/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,d; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); d = 0; if(a -c ==0){ d = b; }else if(b-c==0){ d = a; }else if(a-b==0){ d = c; }else{ } printf("%d",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208268/source.c" target datalayout = "e-m:e-p270:32:32-p271: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_208310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208310/source.c" target datalayout = "e-m:e-p270:32:32-p271: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", c); } else if (b==c){ printf("%d",a); } else if (a==c){ printf("%d",b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208369/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208369/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a, b, c; scanf("%d %d %d", &a, &b, &c); if(a-b == 0) printf("%d\n",c); else if(b-c == 0) printf("%d\n",a); else printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208411/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 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_208455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208455/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> long long int i,j; int main(void){ char s[200100],t[200100]; scanf("%s %s",s,t); int n=strlen(s); int r[26]={0},R[26]={0}; for(i=0;i<n;i++){ r[s[i]-'a']++; R[t[i]-'a']++; } for(i=0;i<26;i++){ int num=r[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208505/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<string.h> #include<stdio.h> char str1[200001],str2[200001]; int main(){ int len,i,j; int alphabets[26],checkcount = 0,error = 0; for(i = 0;i < 26;i++){ alphabets[i] = -1; } scanf("%s",str1); scanf("%s",str2); len = strlen(str1); for(i = 0;i < len;i++){ if(alphabets[str1[i] - 'a'] == -1){ alphabets[str1[i] - ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208549/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,d,p; int x, y, ans; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); scanf("%d", &d); scanf("%d", &p); x = a * p; if(p <= c) y = b; else y = b + (p-c)*d; ans = x < y ? x : y; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208592/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, x, y, charge; scanf("%d", &A); scanf("%d", &B); scanf("%d", &C); scanf("%d", &D); scanf("%d", &P); x = A * P; if(P < C){ y = B; }else{ y = B + (P - C) * D; } if(x <= y){ charge = x; }else{ charge = y; } printf("%d\n", charge)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208642/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ int a,b,c,d,p,ans; scanf("%d %d %d %d %d",&a,&b,&c,&d,&p); a=a*p; if(p-c>0){ b=b+(p-c)*d; } ans=fmin(a,b); printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208693/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,d,p,x,y; scanf("%d %d %d %d %d", &a, &b, &c, &d, &p); x=a*p; y=b; if(c<p) y+=(p-c)*d; if(x>y) x=y; printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208743/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208743/source.c" target datalayout = "e-m:e-p270:32:32-p271: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_ELEMENTS 10000 int root[MAX_ELEMENTS]; void init(){ memset(root, -1, sizeof(root)); } int find(int x){ if(root[x] < 0){ return x; } return root[x] = find(root[x]); } int same(int x, int y){ return find(x) == find(y); } int size(int x){ return -root[f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208787/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208787/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @root = dso_local local_unn...
#include <stdio.h> int main() { int n,i,j,k,a[10000],sum=0,temp; scanf("%d",&n); for(i=0;i<=n-1;i++) scanf("%d",&a[i]); for(i=0;i<=n-2;i++) for(j=i+1;j<=n-1;j++) if(a[i]<a[j]) {temp=a[j]; a[j]=a[i]; a[i]=temp;} for(i=0;i<=n-3;i++) for(j=i+1;j<=n-2;j++) for(k=j+1;k<=n-1;k++) if(a[i]<a[j]+a[k]) sum++; printf("%d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208837/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208837/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n; scanf("%d",&n); int l[n]; for(int i=0;i<n;i++)scanf("%d",&l[i]); for(int i=0;i<n;i++){ for(int j=n-1;j>i;j--){ if(l[j]<l[j-1]){ int tmp = l[j]; l[j]=l[j-1]; l[j-1]=tmp; } } } int ans=0; for(int i=0;i<n-2;i++){ for(int j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208880/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208880/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 Cmp(const void *a, const void *b){ return *(int *)b - *(int *)a; } void Do(int N){ int a, b, c, C; int L[N]; for(a = 0;a < N;a++) scanf("%d", &L[a]); qsort(L, N, sizeof(int), Cmp); C = 0; for(a = 0;a < N;a++){ for(b = a + 1;b < N;b++){ for(c = b + 1;c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<stdint.h> #include<inttypes.h> typedef int32_t i32; typedef int64_t i64; typedef uint64_t u64; typedef struct union_find_add { i32 *parent; i64 *add; } union_find; union_find* new_union_find (i32 n) { union_find *u = (union_find *) calloc (1, sizeof (union_find)); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_208996/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_208996/source.c" target datalayout = "e-m:e-p270: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.union_find_add = ty...
#include <stdio.h> int main(void){ int H,W; int h,w; int S; scanf("%d %d",&H,&W); scanf("%d %d",&h,&w); S=(H-h)*(W-w); printf("%d\n",S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209045/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209045/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <time.h> #define PI 3.14159265358979323846 int main(void) { int H, W, h, w; scanf("%d%d%d%d", &H, &W, &h, &w); printf("%d", H * W - (W* h) - (w * (H - h))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209096/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209096/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d %d %d %d", &H, &W, &h, &w); printf("%d\n", (H - h) * (W - w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209139/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209139/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; (void)scanf("%d %d",&H,&W); (void)getchar(); (void)scanf("%d %d",&h,&w); printf("%d\n",( H - h ) * ( W - w )); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209182/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209182/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 %d %d",&H,&W,&h,&w); printf("%d\n",(W-w)*(H-h)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209225/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209225/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d %d", &H, &W); scanf("%d %d", &h, &w); printf("%d\n", (H-h)*(W-w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209269/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, d; scanf("%d %d %d %d", &a, &b, &c, &d); printf("%d\n", (a-c)*(b-d)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209319/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d", &H); scanf("%d", &W); scanf("%d", &h); scanf("%d", &w); H= H-h; W= W-w; printf("%d", H*W); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209362/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209362/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 hl,wl,h,w; scanf("%d%d%d%d",&hl,&wl,&h,&w); printf("%d\n",(hl-h)*(wl-w)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209412/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ int i,j,k,e,min,x,xmin,jmax,kmax; while(1){ scanf("%d",&e); if(e == 0) break; jmax = pow(e,1.0/2.0); kmax = pow(e,1.0/3.0); min = 10000000; for(j=0;j<=jmax+1;j++){ for(k=0;k<=kmax+1;k++){ if(e>=j*j+k*k*k){ xmin = e-(j*j+k*k*k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209463/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209463/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, e, ee, y, z, min; for ( ; scanf( "%d", &e ), e; printf( "%d\n", min ) ) { min = e; for ( z = 0; z * z * z <= e; z++ ) { ee = e - z * z * z; y = sqrt( ee ); if ( ee - y * y + y + z < min ) min = ee - y * y + y + z; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209535/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209535/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 MAX 200020 #define d_flag 0 char s[MAX+1]; char t[MAX+1]; int main(){ scanf(" %s",s); int len=strlen(s); int i,j=0; for(i=0;i<len;){ if(s[i]!='B'){ t[j++]=s[i++]; continue; } if(s[i+1]=='C'){ t[j++]='D'; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209579/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209579/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[204]; scanf("%s", s); int length = strlen(s)-2; while(length >= 0){ int flag = 1; for(int i=0; i<length/2; i++){ if(s[i] != s[length/2+i]){ flag = 0; break; } if(i == length/2-1) printf("%d\n", length); } if(flag) br...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_209621/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_209621/source.c" target datalayout = "e-m:e-p270:32:32-p271: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...