Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void){ int a, b, ga, gb, ca, cb, i=0, j, r, ri; int lcm_num[101], gcd_num[101]; for(ri=0;ri<100;ri++){ lcm_num[ri] = 0; gcd_num[ri] = 0; } while(scanf("%d %d",&a, &b)!=EOF){ ga = a; gb = b; ca = a; cb = b; if(a!=0||b!=0){ while((r=ga%gb)!=0){ ga = gb; gb = r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ca, cb; int i; while( scanf("%d %d", &a, &b) != EOF ){ ca = a; cb = b; while(1){ if(ca > cb) ca = ca - cb; if(cb > ca) cb = cb - ca; if(ca == cb) break; } i = (a / ca) * b; printf("%d %d\n", ca, i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122249/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122249/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 R,C,i,j; scanf("%d %d", &R,&C); for(i=0;i<R;i++) { if(i%2==0) for(j=0;j<C;j++) printf("#"); else { if((i-1)%4==2) printf("#"); for(j=0;j<C-1;j++) printf("."); if((i-1)%4==0) printf("#"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12235/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int n, m, i, j; scanf("%d %d", &n, &m); for(i = 0; i < n; i ++) { if(i % 2 == 0) { for(j = m; j --;) putchar('#'); } else if(i % 4 == 1) { for(j = m; -- j;) putchar('.'); putchar('#'); } else { putchar('#'); for(j = m; -- j;) putchar(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12240/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 gcd(int x, int y); int main(void) { long int a,b; while (scanf("%ld %ld", &a, &b) != EOF){ printf("%ld %ld\n", gcd(a, b), a / gcd(a, b) * b); } return (0); } /*ユークリッドを用いた最大公約数の計算*/ int gcd(int x, int y) { if (y == 0){ return (x); }else{ return (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122450/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,d,r; double f; scanf("%d %d",&a,&b); d=a/b; r=a%b; f=((double)a)/b; printf("%d %d ",d,r); printf("%lf\n",f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122500/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int x, y; scanf("%d %d", &x, &y); printf("%d ", x / y); printf("%d ", x % y); printf("%f.5\n", 1.0 * x / y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122544/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122544/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b=0; scanf("%d %d", &a, &b); printf("%d %d %f\n", a/b, a%b,(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122588/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122588/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a1,b1; int a2,b2; scanf("%lf%lf",&a1,&b1); a2=a1;b2=b1; printf("%d ",a2/b2); printf("%d ",a2%b2); printf("%.5f\n",a1/b1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int ans1, ans2; double ans3; scanf("%d %d", &a, &b); ans1 = a / b; ans2 = a % b; ans3 = 1.0 * a / b; printf("%d %d %f\n", ans1, ans2, ans3); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122681/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122681/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int d; int r; double f; scanf("%d %d", &a, &b); d = a / b; r = a % b; f = (a * 1.0) / (b * 1.0); printf("%d %d %f\n", d, r, f); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122731/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ,d ,r; double f; scanf( "%d %d" ,&a ,&b ); d = a / b; r = a % b; f = (double)a / b; printf( "%d %d %.5f\n" ,d ,r ,f ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122782/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122782/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); int d = a / b; int r = a % b; double f = a / (double)b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122825/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[17]; char a[17] = {"CODEFESTIVAL2016"}; scanf("%s",&s); int i; i = 0; int counter; counter = 0; while (s[i]) { if (s[i] != a[i]) counter++; i++; } printf("%d",counter); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122898/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122898/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.a = private u...
#include<stdio.h> int main() { char a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p; char s[16] = "CODEFESTIVAL2016"; scanf("%c",&a); scanf("%c",&b); scanf("%c",&c); scanf("%c",&d); scanf("%c",&e); scanf("%c",&f); scanf("%c",&g); scanf("%c",&h); scanf("%c",&i); scanf("%c",&j); scanf("%c",&k); scanf("%c",&l); scanf("%c"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122940/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122940/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(x,y) (((x)>(y))?(x):(y)) int count(int x,int y){ int i,c=0; for(i=0;i<16;i++)if(((x>>i)&1)==1 && ((y>>i)&1)==1)c++; return c; } int dp[32][(1<<16)+1]; int a[33],b[33]; int main(){ int i,j,n,c,k,f,cb; int ans; while(1){ scanf("%d%d",&n,&c); if(n==0 && c==0)brea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122991/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122991/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; int ans = 1; for (int i = 0; i < 4; ++i) { scanf("%d",&n[i]); if(n[i]!=1&&n[i]!=9&&n[i]!=7&&n[i]!=4){ ans = 0; } } for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if(i!=j&&n[i]==n[j]){ ans=0; } } } if(ans==1){ printf("YES"); }el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123033/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int qsort_compare_int(const void *a, const void *b) { return *(int *) a - *(int *) b; } int main(int argc, char *argv[]) { int n[4]; // input scanf("%d %d %d %d", &n[0], &n[1], &n[2], &n[3]); qsort(n, 4, sizeof(int), qsort_...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123077/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n,m,i,j; char a[55][55]; while(scanf("%d%d",&n,&m)!=EOF) { for(i=1;i<=n;i++) { if((i%2==0)&&(i%4==0)) { for(j=1;j<=m-1;j++) a[i][j]='.'; a[i][0]='#'; } if((i%2==0)&&(i%4!=0)) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #define MAX(x,y) x>y?x:y typedef long long int ll; ll N,C,x[100002],v[100002]; ll Solve(){ ll lg=0,tem=0; ll max[100001]; max[0]=0; for(ll i=0;i<N;i++) { lg+=v[i+1]+x[i]-x[i+1]; max[i+1]=MAX(max[i],lg); } ll ans=max[N]; for(ll i=N;i>1;i--) { tem+=v[i]+x[i]-x[i+1]; ans...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @N = dso_local global i64 0...
#include<stdio.h> #include<string.h> int main() { char s1[1001], s2[1001]; int c = 0, c1 = 0,i,j; scanf("%s",s1); scanf("%s",s2); c1 = strlen(s2); for (i = 0; i <= strlen(s1)-strlen(s2); i++) { c = 0; for (j = 0; j < strlen(s2); j++) { if (s1[i+j] != s2[j]) c++; } if (c1 > c) c1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123206/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123206/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,m,i,j,count=0; scanf("%d%d", &n, &m); for(i=0;i<n;i++){ if(i%2==0){ for(j=0;j<m;j++){ printf("#"); } printf("\n"); } else{ if(count%2==0){ for(j=1;j<m;j++){ printf("."); } printf("#\n"); } else{ printf("#"); for(j=1;j<m;j++){ printf("."); } printf("\n"); } count++; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12325/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12325/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[1000],t[1000]; scanf("%s%s",s,t); int len=strlen(t),i,j,cnt,min=len; for(i=0;s[i+len-1]!='\0';i++){ cnt=0; for(j=0;t[j]!='\0';j++){ if(s[i+j]!=t[j]){ cnt++; } } min=cnt<min?cnt:min; } printf("%d",min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123293/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1001],t[1001]; scanf("%s%s",s,t); int slen = strlen(s); int tlen = strlen(t); int ans = 1001; int tmp; for(int i = slen-tlen;i >= 0;i--){ tmp = 0; for(int j = 0;j < tlen;j++)if(s[i+j] != t[j])tmp++; ans = tm...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123336/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define EPS pow(10,-50) #define true 1 #define false 0 int main(){ int n,m; int i,j; int toggle = false; int changebysign = -1; scanf("%d %d",&n,&m); for (i=0 ; i<n ; i++){ for (j=0 ; j<m ; j++){ if (i%2 == 0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12338/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[110]; scanf("%s",s); int sl = strlen(s); for(int i=0;i<sl;i++) s[i] = 'x'; printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[101]; int n; int i; scanf( "%s", str ); n = strlen( str ); for( i = 0; i < n ; i++ ){ str[i] = 'x'; } printf( "%s\n", str ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123466/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123466/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> char s[101]; int main() { scanf("%s", s); for(int i = 0; s[i]; i++){ s[i] = 'x'; } puts(s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123509/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s[101]; scanf("%s",s); for(int i=0;s[i]!='\0';i++){ s[i]='x'; } printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123552/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i; char S[100]; scanf("%s", S); for(i=0;i<strlen(S);i++) S[i] = 'x'; printf("%s\n", S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 mysubstr( char *t, const char *s, int pos, int len ) { if( pos < 0 || len < 0 || len > strlen(s) ) return -1; for( s += pos; *s != '\0' && len > 0; len-- ) *t++ = *s++; *t = '\0'; return 0; } int main(void){ int len,i; char s[100],t[100]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123639/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { char a[105]; int i=0; scanf("%s",a); while(a[i]!='\0') { a[i]='x'; i++; } printf("%s",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123682/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123682/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[10000]; scanf("%s",str); int len=strlen(str); for(int i=0;i<len;i++) { printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123732/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&a,&b); if(a==b) printf("%d",2*a); else if(a>b) printf("%d",2*a-1); else printf("%d",2*b-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <malloc.h> #include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> //ABC124A int main(void) { int n, k, i, cou=0, a, b, tmp; scanf("%d %d", &a, &b); if(a==b) printf("%d", a+b); else if(a>b) printf("%d", 2*a-1); else printf("%d", 2*b-1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max_taste(int* a, int n){ int m1 = 0, m2 = 0; for(int i = 0; i < n; i++){ if(a[i] > m1){ m2 = m1; m1 = a[i]; } else if(a[i] > m2){ m2 = a[i]; } } return m1 + m2; } int main(){ int t; fscanf(stdin, "%d", &t); while(t > 0){ int n; fscanf(stdin, "%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12387/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12387/source.c" target datalayout = "e-m:e-p270: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_unnam...
#include<stdio.h> int main() { int a,b,c,d,e,f,h; scanf("%d %d",&a,&b); c=a+b; d=a-1; h=a+d; e=b-1; f=b+e; if(c>=h&&c>=f) { printf("%d",c); } else if(h>=c&&h>=f) { printf("%d",h); } else if(f>=c&&f>=h) { printf("%d",f); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123912/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123912/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, kei; scanf("%d %d", &A, &B); if (A > B) { kei = 2 * A - 1; } else if (A < B) { kei = 2 * B - 1; } else { kei = A + B; } printf("%d\n", kei); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123963/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123963/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 button(int*,int*); int process(int*,int*,int*); int main(){ int A,B,coin=0; scanf("%d",&A); scanf("%d",&B); process(&coin,&A,&B); process(&coin,&A,&B); printf("%d",coin); return 0; } int button(int *C,int *X){ *C = *C + *X; *X = *X - 1; return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124005/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b; scanf("%d",&a); scanf("%d",&b); if(a>b) printf("%d",a+a-1); else if(a<b) printf("%d",b+b-1); else printf("%d",a+b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124049/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124049/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(int x,int y); int main() { int a,b; scanf("%d %d",&a,&b); printf("%d",max(a,b)); } int max(int x,int y) { if(2*x-1>x+y){ if(2*x-1>2*y-1){ return(2*x-1); }else{ return(2*y-1); } }else{ if(x+y>2*y-1){ return(x+y); }else{ return(2*y-1); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); if(a>=b){ if(a-b>=2) printf("%d",2*a-1); else printf("%d",a+b); }else{ if(b-a>=2) printf("%d",2*b-1); else printf("%d",a+b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124135/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s; scanf("%d%d",&a,&s); int sum=0; for(int i=0;i<2;i++){ if(a>s){ sum+=a; a--; } else{ sum+=s; s--; } } printf("%d\n",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, R; scanf("%d %d", &A, &B); if (A > B){ C = A - 1; R = A + C; } if (A < B){ C = B - 1; R = B + C; } if (A == B){ R = A + B; } printf("%d", R); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124229/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124229/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(int a,int b); int main(void) { int a,b,sum=0,k=0; scanf("%d%d",&a,&b); k = max(a,b); sum = sum + k; if(k == a) a = a - 1; else if(k == b) b = b - 1; sum = sum + max(a,b); printf("%d",sum); return 0; } int max(int a,int b) { if(a >= b) { return a; } else { return b; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&a,&b); if(a==b) printf("%d\n",a+b); if(a==b-1) printf("%d\n",a+b); if(b==a-1) printf("%d\n",a+b); if(a<=b-2) printf("%d\n",b+(b-1)); if(b<=a-2) printf("%d\n",a+(a-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int x, y; int ans; scanf("%d", &x); scanf("%d", &y); ans = 0; if(x > y){ ans += x; x--; }else{ ans += y; y--; } if(x > y){ ans += x; x--; }else{ ans += y; y--; } printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ans=0; scanf("%d%d",&a,&b); if(a>b){ ans+=a; a--; }else { ans+=b; b--; }if(a>b){ ans+=a; a--; }else { ans+=b; b--; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct{ char s[32]; char p[1001]; } Dic; int compare_Dic(const void *a, const void *b) { return (int)strcmp(((Dic*)a)->s, ((Dic*)b)->s); } int main(int argc, char *argv[]){ int i,j,n; char b[32], t[10000]; Dic d[100],*p; memset(d, 0, sizeo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124452/source.c" target datalayout = "e-m:e-p270: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.Dic = type { [32 x ...
#include<stdio.h> int ta[10010],to[60010],nt[60010],id[10010],cmp[100010],r=0,f[10010]={0}; void sdfs(int e,int s,int k){ int i; f[s]++; for(i=ta[s];i+1;i=nt[i]){ if(i<e&&k<0&&f[to[i]]==0||i>=e&&k>=0&&f[to[i]]==1)sdfs(e,to[i],k); } k<0?(id[r++]=s):(cmp[s]=k); } void scc(int v,int e,int *a,int *b){ int i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @r = dso_local local_unname...
#include<stdio.h> int main() { char s[3003],t[3003]; scanf("%s%s",s,t); int n,m; n=0; while(s[n]!='\0') n++; m=0; while(t[m]!='\0') m++; int i,j; int dp[3003][3003]; for(i=0;i<=n;i++) for(j=0;j<=m;j++) dp[i][j]=0; for(i=0;i<n;i++) { for(j=0;j<m;j++) { dp[i+1][j+1]=dp[i+1][j]; if(dp[i+1][j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> long long max(int len, ...) { long long i, _max, num; va_list ap; va_start(ap, len); _max = va_arg(ap, long long); for (i = 1; i < len; i++) { num = va_arg(ap, long long); if (num > _max) _ma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124597/source.c" target datalayout = "e-m:e-p270: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.__va_list_tag = typ...
#include <stdio.h> int main(void) { int i; int n, a[100]; int sum; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", a + i); for (i = 1; i < n - 1; i++) if (a[i - 1] + a[i + 1] == 2) a[i] = 1; sum = 0; for (i = 0; i < n; i++) sum += a[i]; p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12464/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12464/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
#pragma region kyopuro_templates #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.h> typedef long long ll; typedef long double ld; #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)) #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124683/source.c" target datalayout = "e-m:e-p270: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_AVL_set = type...
#include<stdio.h> #include<math.h> int main(void){ long N,P,ans=1; scanf("%ld %ld",&N,&P); if(N==1){ printf("%ld",P); return 0; } int div=0; for(int i=2;P>1&&i<=sqrt(P);i++){ div=0; while(P%i==0){ P/=i; div++; if(div>=N) { ans*=i; div-=N; } } } printf("%ld",ans); ret...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124748/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124748/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x, y, b, p; int fee[400]; scanf("%d", &n); for(i=0;i<n;i++){ scanf("%d %d %d %d", &x, &y, &b, &p); if(b>=5 && p>=2){ fee[i] = (x*b + y*p)*0.8; }else if(b>=5 && p<2){ if(x*b+y*p < (x*b+y*2)*0.8) fee[i] = x*b + y*p; else fee[i] = (x*b ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124841/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 pow2(long long x){ long long r=1; while(x!=0){r*=2;x--;} return r; } long long bc(long long x){ long long r=0; while(x!=0){r+=(x%2);x/=2;} return r; } long long calc(long long d,long long x[]){ long long r = 0,i,m; m = x[1];d/=2; for(i = 2;i <= 15;i++){ if(d%2){ if(m < x[i])...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124892/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int x; scanf("%d", &x); if(x>=30) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124935/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int n; scanf("%d",&n); if(n>=30) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124979/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124979/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n; scanf("%d", &n); if(n >= 30) printf("%s\n", "Yes"); else printf("%s\n", "No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125020/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ; scanf("%d", &a) ; a >= 30 ? printf("Yes") : printf("No") ; return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125064/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int x = 0; scanf("%d",&x); if(x >= 30){ printf("Yes"); }else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125107/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; scanf("%d" ,&t); if(t >= 30) printf("Yes\n"); else printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125150/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ int x; scanf("%d",&x); if(x>29){ printf("Yes");} else{ printf("No");} }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125194/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int x; scanf("%d", &x); printf(x >= 30 ? "Yes\n" : "No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125237/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void) { int X; char buf[32], *ch; fgets(buf, sizeof(buf), stdin); ch = strtok(buf, " "); X = atoi(ch); if(X >= 30) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125280/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125280/source.c" target datalayout = "e-m:e-p270: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...
// SPDX-License-Identifier: X11 // 2020-08-02 (Live) #include <stdio.h> int main() { int X; scanf("%d",&X); X >= 30 ? printf("Yes\n") : printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125323/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125323/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &i); if (i < 30) printf("No"); else printf("Yes"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125367/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125367/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 #2816 title:Alphabet Block @kankichi573 */ #include <stdio.h> #include <string.h> int alpha[26]; char s[1001]; int main() { char *p; int i,ret; memset(alpha,0,sizeof(alpha)); scanf("%s",s); for(p=s;*p;p++) alpha[*p-'a']++; for(i=ret=0;i<26;i++) ret+=(alpha[i]%2); printf("%d\n",re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125417/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125417/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @alpha = dso_local local_un...
#include<stdio.h> struct abc{ }; int main(void) { int n,m; int i,j; int temp,max,maxi; while(1){ max = 0; scanf("%d %d",&n,&m); if(n == 0 && m == 0) break; int a[m]; for(i = 0; i < m; i++) a[i] = 0; for(i = 0; i < n; i++){ for(j = 0; j < m; j+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, q; scanf("%d %d", &n, &q); char s[200005]; scanf("%s", s); int i, j; char t[200005], d[200005]; for (i = 0; i < q; i++) scanf(" %c %c", &t[i], &d[i]); int p[200005], pp[200005]; for (i = 0; i <= n + 1; i++) p[i] = pp[i] = 0; for (i = n; i > 0; i--) s[i] = s[i - 1]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,M,i,j,A[1000],c,b[1000],max_count=0,max_game=-1; scanf("%d%d",&N,&M); for(i=0;i<N;i++){ scanf("%d",&A[i]); b[i]=0; } for(i=0;i<M;i++){ scanf("%d",&c); for(j=0;j<N;j++){ if(A[j]<=c){ b[j]++; break; } } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125590/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125590/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void) { int N,M,i,j,max=0,num; scanf("%d%d",&N,&M); int A[N],B[M],count[N]; for(i=0;i<N;i++) {scanf("%d",&A[i]); count[i]=0;} for(i=0;i<M;i++) scanf("%d",&B[i]); for(i=0;i<M;i++) { for(j=0;j<N;j++) { if(A[j]<=B[i]){count[j]++;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125633/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125633/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 lcompr(const void *a,const void *b){ return *(long*)a == *(long*)b ? 0 : (*(long*)a < *(long*)b ? 1 : -1); } int main(void){ register int i; long n; scanf("%ld",&n); long a[n]; for(i = 0;i < n;i++)scanf("%ld",&a[i]); qsort(a,n,sizeof(long),lcompr); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125684/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125684/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <ctype.h> #include <string.h> int main() { int i; int len; char str[1001]; char answer[1001] = "\0"; char a = 'a', c = 'c', e = 'e', h = 'h', l = 'l', p = 'p'; fgets(str, sizeof(str), stdin); len = strlen(str); for(i=0; i<len-5; i++){ if(str[i]==a){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125785/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125785/source.c" target datalayout = "e-m:e-p270: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> void main(void){ char str[10]; scanf("%s",str); int i; int ans = 1; for(i = 1;i <= 5;i++){ if(str[i*2-2] != 'h'){ if(str[i*2-2] == '\0'){ break; } ans = 0; break; } else if( str[i*2-1] != 'i'){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125828/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125828/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 // thx Ebi-chan! // #pragma GCC optimize("unroll-loops") // #pragma GCC optimize("O3") #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> #in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125871/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125871/source.c" target datalayout = "e-m:e-p270: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<stdlib.h> #include<math.h> #include<string.h> typedef long long ll; typedef long double ld; #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<<60) #define MOD1 1000000007 void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a=c;}/*swap 交換*/ ll max...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125921/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125921/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,Y,i,k,p,t=0,a,b,c; scanf("%d %d",&N,&Y); for(i=0;i<=N;i++){ for(k=0;k<=N;k++){ p=N-(i+k); if(p>=0&&i+k+p==N&&10000*p+5000*k+1000*i==Y){ a=p; b=k; c=i; t=1; break; } } } if(t==1){printf("%d %d %d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125965/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125965/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 check(int n,int y,int num[3]) { for(int i=0;i<=(y/10000);i++) { if(((y-9000*i-1000*n)%4000)==0) { num[0] = i; num[1] = (y-9000*i-1000*n)/4000; num[2] = n - num[0] -num[1]; if(num[2]<0||num[1]<0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126007/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> #define REP(i,n) for(i=0;i<n;i++) #define ll long long //prototype declaration int iin(); long long llin(); double din(); char cin(); void stin(char *s); void iout(int i); void llout(long long i); void dout(double i); voi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, y; scanf("%d %d", &n, &y); int a, b, c; a = y/10000; b = (y - 10000*a)/5000; c = (y - 10000*a - 5000*b)/1000; // printf("%d %d %d\n", a, b, c); int i, j, k; if(n<a+b+c) { printf("-1 -1 -1\n"); return 0; // } } else {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126094/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N,Y; scanf("%d " ,&N); scanf("%d" ,&Y); double k = Y / 1000; double b = k-N; double round_x ,round_y ,round_z; int answer_x ,answer_y ,answer_z ; round_x = floor(b/4); round_y = ceil(2*(b)/9); round_z = floor(k/5); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126137/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, Y, x, y,z; scanf("%d %d", &N, &Y); for (y = 0; y <= (Y / 5000); y++) { for (x = 0; x <= (Y / 10000); x++) { if (N - x - y > 0) z = N - x - y; else z = 0; if ((x + y + z) == N && Y - (10000 * x + 5000 * y + 1000 * z) == 0) { printf("%d\t%d\t%d\t\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 calc(int x,int N,int Y){ double y,z; y = (Y-1000*N-9000*x)/4000.0; z = (5000*x+5000*N-Y)/4000.0; //printf("%f,%f\n",y,z); if(ceil(y)!=floor(y)||ceil(z)!=floor(z)){ return -1; } if(y<0 || z<0){ return -1; } if(x+y+z!=N){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 LARGE 100001 #define MIN(a,b) ((a) < (b) ? (a) : (b)) int getAns(int a[],int n,int s){ int i=0,j=0,k; int sum=0; int ans=LARGE; for(i=1;i<=n;i++){ sum+=a[i-1]; if(sum >= s){ ans=MIN(i-j,ans); while(sum >= s){ sum-=a[j]; if(sum >= s){ ans=MIN(i-j-1,ans); j++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126296/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 101 #define RIGHT 100 int shiki[N]; int n; long long memo[N][21]; // i番目の数字, 今までの合計値 long long getWay(int i, int num) { long long ret = 0; int dx[] = {1, -1}; int j; if (memo[i][num] != -1){ return (memo[i][num]); } if (i == n - 2){ if (num == shiki[RIGH...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126360/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126360/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @memo = dso_local local_unn...
#include <stdio.h> #include <math.h> int getgcd(int n, int m){ int r; if(n>m){ int t= m; m=n; n=t; } while ((r = m % n) != 0) { m = n; n = r; } return n; } void main() { int N,t,i,j,k,m,n,sum=0,r; scanf("%d", &N); for(i=1;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126403/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126403/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gcd(int n,int m){ if(n%m==0) return m; else return gcd(m,n%m); } int main(void){ int x,i,j,k; long ans=0; scanf("%d",&x); for(i=1;i<=x;i++){ for(j=1;j<=x;j++){ long tmp = gcd(i,j); for(k=1;k<=x;k++){ ans += gcd(tmp,k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126447/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部変数 static FILE *szpFpI; // 入力 // 内部変数 - テスト用 #ifdef D_TEST static int siRes; static FILE *szpFpA; static int siTNo; #endif // 1行出力 int fOutLine( char *pcpLine //...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126533/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k_r(int a,int b){ int tmp,r; if(a<b){ tmp=a; a=b; b=tmp; } r=a%b; while(r!=0){ a=b; b=r; r=a%b; } return b; } int k_r2(int a,int b,int c){ return k_r(k_r(a,b) , k_r(a,c)); } int main(){ int K; long int count=0; scanf("%d",&K); int i=1; int j=1; i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, int y); int main() { int n; int x, y, z; scanf("%d", &n); int t, s, q; s = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { t = gcd(i, j); q = gcd(t, k); s += q; } } } printf("%d", s); } int gcd(int x, int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Euclid(int a,int b){ int r; while(1){ r = a % b; if(r == 0){ break; } a = b; b = r; } return b; } int main(){ int n; scanf("%d",&n); int sum = 0; int d; for(int i = 1;i <= n;i++){ for(int j =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126678/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126678/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> //#include <math.h> //GCD int gcd(int a, int b) { if (b == 0) return a; return gcd(b, a % b); } int main() { int k; scanf("%d", &k); long ans = 0; for (int i=0; i<k; i++) { for (int j=0; j<k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126720/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126720/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, int y) { int r; while ((r = x % y) != 0) { x = y; y = r; } return y; } int main() { int n, sum = 0; scanf("%d", &n); for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { sum += gcd(i, gcd(j, k)); } } } printf("%d\n", su...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126764/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 comp(const void *a,const void *b){ return *(long long int *)a - *(long long int *)b; } int main(){ long long int n,a[10005],i,ans; while(scanf("%lld",&n)!=EOF){ if(n==0)break; for(i=0;i<n;i++)scanf("%lld",&a[i]); qsort(a,n,sizeof(long long int),comp); ans=0; for(i=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126807/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> //#include <math.h> //昇順 int acs(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int n; scanf("%d", &n); int tmp, a[n], b; long ans = 0; for (int i=0; i<n; i++) { scanf("%d", &tmp); a[i] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126872/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,max=0,mi=1,i,a,b; int w[1000001]={0}; scanf("%d %d",&n,&m); while(m--){ scanf("%d %d",&a,&b); w[a]+=b; if(b>0){ if(max<w[a]){ max=w[a]; mi=a; } if(max==w[a]&&mi>a)mi=a; } else{ max=0; mi=1; for(i=1;i<=n;i++){ if(max...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126922/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100002]; scanf("%s",s); int len=strlen(s),i; for(i=0;i<len;i+=2) printf("%c",s[i]); puts(""); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126973/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126973/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[100000]; scanf("%s",&str); for(int i=0;i<strlen(str);i++){ if(i%2==0){ printf("%c",str[i]); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127015/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127015/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...