Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main() { char s[4]; scanf("%s",s); if(s[0]==s[1]&&s[1]!=s[2]&&s[2]==s[3]) { printf("Yes"); } else if(s[0]==s[2]&&s[2]!=s[3]&&s[1]==s[3]) { printf("Yes"); } else if(s[0]==s[3]&&s[3]!=s[2]&&s[2]==s[1]) { printf("Yes"); } else { printf("No"); } return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121362/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121362/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { char a,b,c,d; scanf("%c %c %c %c",&a,&b,&c,&d); if(a==b && b==c && c==d && a==d) printf("No\n"); else if(a==c && b==d) printf("Yes\n"); else if(a==d && b==c) printf("Yes\n"); else if(a==b && c==d) printf("Yes\n"); else print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121412/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; int i,j; int count=0; scanf ("%s",&s); for(i=0;i<4;i++){ for (j=0;j<4;j++){ if(s[i]==s[j]){ count++; } } } if (count != 8){ printf("No\n"); } else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121463/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121463/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 text[5]; scanf("%s",text); if(text[0]==text[1]&&text[2]==text[3]&&text[0]!=text[2]) printf("Yes\n"); else if(text[0]==text[2]&&text[1]==text[3]&&text[0]!=text[1]) printf("Yes\n"); else if(text[0]==text[3]&&text[1]==text[2]&&text[0]!=text[1]) printf("Yes\n"); else prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121520/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char a[3]; for(int i=0;i<4;i++){ scanf("%c",&a[i]); } if (a[0]==a[1]&&a[2]==a[3]&&a[0]!=a[2]){ printf("Yes"); } else if(a[0]==a[2]&&a[1]==a[3]&&a[0]!=a[1]){ printf("Yes"); } else if(a[0]==a[3]&&a[2]==a[1]&&a[0]!=a[2]){ printf("Yes"); } else{ printf("N...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121571/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 mozi[5]; int i = 0; int q, p = 0; int j, t; scanf("%s", mozi); for (i = 0; mozi[i] != '\0'; ++i); for (j = 3; j >= 0; j--) { for (t = 0; t < j; t++) { if (mozi[j] == mozi[t]) { p++; } } } if (p == 2&& i == 4) { printf("Yes...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121621/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121621/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> int main(void){ int i,j,k; char S[10]; bool flag = false; scanf("%s",S); for(i = 0;i < 4;i++){ flag = false; for(j = 0;j < 4;j++){ if(S[i] == S[j] && i != j){ if(flag){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121672/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121672/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>//random,NULL #include <string.h> #include <time.h> #include <unistd.h>//sleep() #include <math.h> #include <stdbool.h> #define rep(i,n) for(int i=0; i<((int)n); i++) #define REP(i,n) for(int i=0; i<=((int)n); i++) #define srep(i,a,n) for(int i=a; i<((int)n); i++) #define SREP(i,a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121715/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121715/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mod = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #if 1 #define MAX 212345 #define BLOCK_SIZE 450 #else #define MAX 100 #define BLOCK_SIZE 2 #endif #define BLOCK_MAX ((MAX + BLOCK_SIZE - 1) / BLOCK_SIZE) struct mamegu { int x, y; int idx; }; int mikakosi(const void* x, const void* y) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121766/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121766/source.c" target datalayout = "e-m:e-p270: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.mamegu = type { i32...
#include <stdio.h> int gcd(int a, int b); int main(void) { int a, b; while (scanf("%d", &a) != EOF){ scanf("%d", &b); printf("%d %d\n", gcd(a, b), a / gcd(a, b) * b); } return (0); } int gcd(int a, int b) { int temp; if (a <= b){ temp = a; a = b; b = temp; } while (1){ if (b == 0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121816/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121816/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int a[1000005],c=1; void fun(int n,int i) { if (n==0) { return ; } if(i==0) { c++; } if(a[n-1]>i-1) { return fun(n-1,a[n-1]); } else return fun(n-1,i-1); } int main() { int n; scanf("%d",&n); for (int i = 0; i < n; ++i) { scanf("%d",&a[i]); } fun(n,a[n-1]); if(a[n-1]==0) pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unnamed_...
#include <stdio.h> #include <stdlib.h> #define MIN(a, b) ((a)<(b)?(a):(b)) #define MAX(a, b) ((a)>(b)?(a):(b)) //#define M 100001 int main() { int n, m; long long s; int m1, m2; scanf("%d", &n); s = m1 = m2 = 0; for(int i = 0; i < n; ++i) { scanf("%d", &m); s += m; } f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12191/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12191/source.c" target datalayout = "e-m:e-p270:32:32-p271: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){ long long a,b,c,d,e; long long g; long long r; while(scanf("%lld%lld",&d,&e)==2){ if(d!=e){ a=d>e?d:e; b=d>e?e:d; r=a*b; while(a%b!=0){ c=b; b=a%b; a=c; } g=b; } else { r=d*e; g=d; } printf("%lld %lld\n",g,r/g); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121953/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121953/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { long long temp; long long m,n, a, b, i, gcd, lcd; while (scanf("%lld %lld", &a, &b) != EOF) { m = a; n = b; while (n != 0) { temp = m%n; m = n; n = temp; } gcd = m; lcd = a*b / gcd; printf("%lld %lld\n", gcd, lcd); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_121997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_121997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int x,y,z; int gcd,lcm; while(scanf("%d%d",&a,&b)!=EOF) { if(a>=b) { x=a; y=b; } else { x=b; y=a; } while(1) { z=x%y; if(z==0) break; else { x=y; y=z; } } gcd=y; if(a>=b) { x=a; y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122046/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int gcd(int a,int b) { if(b==0) return a; return gcd(b,a%b); } int main() { int a,b,g,lcm; while(scanf("%d%d",&a,&b)!=EOF) { g=gcd(a,b); lcm=a/g*b; printf("%d %d\n",g,lcm); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122097/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122097/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,y; int i,j,k; while(scanf("%d %d", &a, &b) != EOF) { if(a > b) k = a % b; else k = b % a; if(k == 0) { if(a > b) x = b; else x = a; }else { for(i = 1; i <= k; i++) { if(k % i == 0) { j = k / i; if(a % j == 0 && b % j == 0) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122147/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122147/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int x,y; while(scanf("%d%d",&a,&b) != EOF){ fflush(stdin); x=a; y=b; if(a<b){ int temp=a; a=b; b=temp; } if(a%b!=0) while(1){ int temp=a%b; a=b; b=temp; if(a%b==0)break; } y=x/b*y; printf("%d %d\n",b,y); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122204/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122204/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { long a, b; long g, l; long r, s, t; while (scanf("%ld %ld", &a, &b) != EOF) { r = a > b ? a : b; s = a < b ? a : b; while (r % s != 0) { t = r; r = s; s = t % r; } g = s; l = a * (b ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122255/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r=100,a2,b2,i,cnt=0,s=1; long int yaku[1000]={0},bai[1000]; while(scanf("%d %d",&a,&b)!=EOF){ a2=a; b2=b; if(a>b){ r=a-b; }else{ r=b-a; } while(r!=0){//テ」ツδヲテ」ツδシテ」ツつーテ」ツδェテ」ツδε」ツ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122299/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while ( scanf( "%d %d", &a, &b ) != EOF ) { int i, min, gcd = 1, lcm = 1, start = 2; loop: min = ( a > b ? b : a ); for ( i = start; i <= min / 2; i++ ) if ( a % i + b % i == 0 ) { a /= i; b /= i; gcd = lcm *= i; start = i; goto loop; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122341/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i; double q=0; while(scanf("%d %d",&a,&b)!=-1){ c=a; d=b; while((a>b?b:a)){ p=a%b; a=b; if(!p) break; b=p; } for(i=0;i<d;i++) q+=c/b; printf("%d %d\n",b,(int)q); q=0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122385/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122385/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int gcd(int a, int b); int lcm(int a, int b); int main(void) { int s_gcd, s_lcm; int a, b; while (scanf("%d %d", &a, &b) != EOF){ s_gcd = gcd(a, b); s_lcm = lcm(a, b); printf("%d %d\n", s_gcd, s_lcm); } return (0); } int gcd(int m, int n) { if (m % n == 0){ return (n); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122428/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122428/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r,kotae[3][1000],kazu,m,aa,aaa,bbb,bb; kazu=0; while(scanf("%d%d",&a,&b)!=EOF){ if(b>a){ m=a; a=b; a=m; } aa=a; bb=b; m=a*b; kazu=kazu+1; while(b!=0){ r=a%b; a=b; b=r; } kotae[1][kazu]=a; aaa=aa; bbb=bb; while(aaa!=bbb){ if(aaa<bb...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122471/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122471/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int d,r; double f; scanf("%d",&a); scanf("%d",&b); d = a / b; r = a % b; f = (double)a / (double)b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122521/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122521/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double a2, b2; int d, r; double f; scanf("%d %d", &a, &b); a2 = a; b2 = b; d = a / b; r = a % b; f = a2 / b2; printf("%d %d %f", d, r, f); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122565/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122565/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double f; scanf("%d",&a); scanf("%d",&b); printf("%d ",a/b); printf("%d ",a%b); printf("%.5f\n",(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122608/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122608/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b,i,j; double k; scanf("%d %d",&a,&b); j = a%b; i=a/b; k=1.0*a/b; printf("%d %d %f",i,j,k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122659/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122659/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d %d %f\n", a/b, a%b, (double) a / b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122701/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; printf("%d %d",d,r); f = (double)a / b; printf(" %lf\n",f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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/(double)b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122796/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 value_1,value_2; scanf("%d %d",&value_1,&value_2); double value_1_d = (double) value_1; double value_2_d = (double) value_2; printf("%d %d %.8lf\n",value_1 / value_2,value_1 % value_2,value_1_d/ value_2_d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122846/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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], ans[17] = "CODEFESTIVAL2016"; int cnt = 0; scanf("%s", s); for (int i = 0; i < 16; i++) { if (s[i] != ans[i]) { cnt++; } } printf("%d\n", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122897/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m,n,i,j,k; scanf("%d %d",&n,&m); for(i=1;i<=n;i++){ //for(j=1;j<=m;j++){ if(i%2==1 || i==1){ for(k=0;k<m;k++) printf("#"); } else if(i%4==2){ for(k=0;k<m;k++){ if(k==m-1) p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12294/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12294/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define min(x,y) ((x)<(y)?(x):(y)) #define max(x,y) ((x)<(y)?(y):(x)) #define rep(i,n) for(int i=0;(i)<(n);(i)++) #define INF 1000000000 int n; int t[16][17]; int main(void){ while(1){ scanf("%d",&n); if(n==0) break; rep(i,n){ rep(j,n+1){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_122983/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_122983/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int N[5],flag=0; for(int i=0;i<4;i++){ scanf("%d",&N[i]); if((N[i]!=1)&&(N[i]!=9)&&(N[i]!=7)&&(N[i]!=4)) flag++; } for(int i=0;i<3;i++){ for(int j=i+1;j<4;j++){ if(N[i]==N[j]) flag++; } } if(flag!=0){ printf("NO\n"); }else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_123076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123076/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <limits.h> int main(void){ int h,w,n; scanf("%d%d%d",&h,&w,&n); int c[h][w],counth=0,countw=0; for (int i=0; i<n; i++){ int a; scanf("%d",&a); for (int j=0; j<a; j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123119/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123119/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> long long Max(long long a, long long b){ return a>b?a:b; } long long x[100000],v[100000]; long long f1[100000]={0},f2[100000]={0},g1[100000],g2[100000]; int main(){ long long n,c; scanf("%lld %lld",&n,&c); int i,j,k; for(i=0;i<n;i++){ scanf("%lld %lld...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123162/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123162/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @f1 = dso_local local_unnam...
#include <stdio.h> int ft_strlen(char *str) { int len; len = 0; while (str[len] != '\0') len++; return (len); } int check_chenge_char(char *dest, char *src) { int i; int count; i = 0; count = 0; while (dest[i] && src[i]) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123212/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1005]; char t[1005]; int i; for(i=0;i<1005;i++){ s[i] = '0'; t[i] = '0'; } scanf("%s",&s); scanf("%s",&t); int slen,tlen; for(slen=0;s[slen] != '0';slen++){ } slen = slen-1; //printf("%d\n",slen); for(tlen=0;t[tle...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123256/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <limits.h> #include <time.h> int min(int a, int b) { return a < b ? a : b; } int main(){ int i,j,length,match=0,ans=114514; char s[1001]={},t[1001]={}; scanf("%s %s",s,t); length=strlen(s)-strlen(t); for(i=0; i<=le...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123306/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123306/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { int i = 0; char S[100]; scanf("%s", S); for(int i = 0; i < strlen(S); i++) { S[i] = 'x'; } printf("%s", S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0; char str[101]; scanf("%s", str); for (i = 0; str[i] != '\0'; i++){ printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123407/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123407/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 len,i; char s[101]; scanf("%s",s); len=strlen(s); for(i=0;i<len;i++) printf("x"); printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123450/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//ABC154_B.I miss you... //与えられた文字列Sの全ての文字をxで置き換えて出力するプログラム //Sは英小文字のみからなる1以上100以下の文字列 //入力 //*S #include <stdio.h> #include <string.h> int main(){ char S[110]; //SとSの長さを取得 scanf("%s",S); int len; len = strlen( S ); //printf("%s\n",S); for( int i=0; i<len; i++ ){ S[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123515/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <memory.h> #include <ctype.h> #include <stdlib.h> #include <string.h> int main(void){ char str[256]; int len, i; scanf("%s", str); len = strlen(str); for (i=0;i<len;i++){ str[i] = 'x'; } printf("%s", str); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123559/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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> int main(void){ char S[101]; scanf("%s",S); int len = strlen(S); while(len>0){ printf("x"); len--; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123609/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123609/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[111]; int cnt; scanf("%s",S); cnt = strlen(S); for(int i=0;i<cnt;i++){ printf("x"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123667/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, char* argv[]){ int a=0,b=0,ans=0; char t[100],s[100],c[100]; scanf("%s",s); a = strlen(s); for (int i = 0; i < a; i++) { s[i]='x'; } s[a+1]='\0'; printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123724/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void){ char s[101]; int i; scanf("%100s", s); for(i=0;i<strlen(s);i++) printf("x"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123775/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c = A + B; int a = A + (A-1); int b = B + (B-1); if (a>b && a>c){ printf("%d",a); }else if (b>a && b>c){ printf("%d",b); }else{ printf("%d",c); }; printf("\n"); };
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123818/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123818/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int num[2]; int result; result = 0; i = 0; scanf("%d %d",&num[0],&num[1]); while (i < 2) { if (num[0] > num[1]) { result = result + num[0]; num[0]--; } else { result = result + num[1]; num[1]--; } i++; } printf("%d",result); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123861/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123861/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a,&b); if(a<b){ c=2*b-1; }else if(a>b){ c=2*a-1; }else{ c=2*a; } printf("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123904/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123904/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,cnt=0;; scanf("%d",&A); scanf("%d",&B); for (int i = 0; i < 2; i++) { if(A>B) { cnt+=A; A--; } else { cnt+=B; B--; } } printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123948/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123948/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; C=0; scanf("%d %d",&A,&B); if(A>=B){C+=A;A--;}else{C+=B;B--;} if(A>=B){C+=A;A--;}else{C+=B;B--;} printf("%d\n",C); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123991/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123991/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int sum=0; scanf("%d %d",&a,&b); if(a<=b){ sum=b; b--; } else { sum=a; a--; } if(a<=b){ sum=sum+b; } else { sum=sum+a; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124033/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 click_2button(int *button1, int *button2){ int coin = 0; coin += *button1; (*button1)--; coin += *button2; (*button1)++; return coin; } int main(void){ int a, b, in_a, in_b, count; int coin[3]; scanf("%d %d", &in_a, &in_b); a = in_a; b = in_b; coin[0] = click_2button(&a, &b); coin[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124077/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10][4]={0},n,i,j; scanf("%d",&n); for (i=1;i<=n;i++) { int k; for (j=1;j<=6;j++) { scanf("%d",&k); a[k][i]=1; } } int now=1; for (;now<=9;now++) if (a[now][1]||a[now][2]||a[now][3]) continue; else { printf("%d\n",now-1); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12412/source.c" target datalayout = "e-m:e-p270:32:32-p271: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, b; scanf("%d %d", &a, &b); int total = 0; if(a < b) total += 2 * b - 1; if(a > b) total += 2 * a - 1; if(a == b) total += a + b; printf("%d\n", total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int a,b; int main(void){ scanf("%d%d",&a,&b); if(a-b >= 2){ printf("%d",a+a-1); }else if(b-a >= 2){ printf("%d",b+b-1); }else{ printf("%d",a+b); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124213/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 pressbutten(int A,int B) { int sum=0; if (A >= B) { sum += A; A--; if (A > B) { sum += A; } else sum += B; } else { sum += B; B--; if (B > A) { sum += B; } else sum += A; } printf("%d",sum); } int main() { int a, b; scanf("%d %d",&a,&b); pressbutte...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124264/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,max1,max2,max; scanf("%d",&a); scanf("%d",&b); if(a<b){ max1 = b; b--; }else{ max1 = a; a--; } if(a<b){ max2 = b; }else{ max2 = a; } max =max1 + max2; printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <math.h> #include <stdlib.h> int main() { int n,m; scanf("%d%d",&n,&m); if(n-2>=m) printf("%d\n",2*n-1); else if(m-2>=n) printf("%d\n",2*m-1); else printf("%d\n",n+m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124350/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k=0; scanf ("%d%d",&a,&b); if (a>b){ k=k+a; a--; } else { k=k+b; b--; } if (a>b){ k=k+a; a--; } else { k=k+b; b--; } printf ("%d",k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124394/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 dictionaryOrder(const char *s1, const char *s2){ while(*s1 == *s2){ if(*s1 == '\0'){ return 0; } s1 += 1; s2 += 1; } return (*s1 - *s2); } void sortStr(char str[][31], int pageList[], int strlen){ int i, j, tempInt; char temp[31]; for(i=0; i<st...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124437/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdlib.h> int cup[100],stat[100],sum[100],wat[200]; int N,MIN; int search(int cc,int left,int look,int num){ int i; stat[look]=1; if(left==0){ if(cc<N)stat[cc]=2; if(num==0)return 1; for(i=N-1;i>=0;i--){ if(stat[i]==0)break; if(stat[i]==1 && search(i,cup...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stat = dso_local local_unn...
#include <stdio.h> #include <string.h> int main(){ int p, q, i, j, mod[100],place; while(scanf("%d%d", &p, &q) != EOF){ memset(mod, 0, sizeof(mod)); i = 0; p %= q; mod[i++] = p; p *= 10; place = -1; while(p){ putchar((p / q) + '0'); p %= q; for(j = 0;mod[j]; ++j){ if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124538/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124538/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_LENGTH 5000 char input0[MAX_LENGTH], input1[MAX_LENGTH]; int dp[MAX_LENGTH][MAX_LENGTH]; int max(int foo, int bar) { if (foo > bar) { return foo; } else { return bar; } } int lcs(int i, int j) { if (i == 0 || j == 0) { return 0; } else if (dp[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124589/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124589/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dp = dso_local local_unnam...
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<limits.h> #define rep(i,begin,end) for(int i=begin; i<end; i++) #define revrep(i,begin,end) for(int i=begin; i>end; i--) #define lld long long int #define MOD 1000000007 #define MAX 1000005 long long int fac[MAX], finv[MAX], inv[MAX]; v...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124631/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124631/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @fac = dso_local local_unna...
#include <stdio.h> int main(void) { int N, M; int a[100], b[100]; int min, max; int count; int i, j; scanf("%d%d", &N, &M); for (i = 0; i < M; i++){ scanf("%d%d", &a[i], &b[i]); } min = 1; count = 0; while (1){ max = 0; for (i = 0; i < ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124675/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124675/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> typedef enum { false, true }boolean; typedef struct { int a; int b; int c; }edge; typedef struct vsub{ int v; int num; struct vsub **nexts; int *c; }vertex; boolean search(boolean *grave, vertex *ver, int sum, int dest, int border){ if(sum >= border){ return fals...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124718/source.c" target datalayout = "e-m:e-p270: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.vsub = type { i32, ...
#include <stdio.h> int main(void) { int d_num,d_cur; int card_num[3][10]; int nums[9]; char colors[9][4]; int i; int ok; scanf("%d",&d_num); for(d_cur=0;d_cur<d_num;d_cur++) { for(i=0;i<9;i++)scanf("%d",&nums[i]); for(i=0;i<9;i++)scanf("%s",colors[i]); for(i=0;i<10;i++) { card_num[0][i]=card_num[1][i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124798/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(a,b) ((a)<(b)?(a):(b)) int main(void){ int n,i; int x,y,b,p; int ans; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d%d%d",&x,&y,&b,&p); if(b>=5 && p>=2) ans=0.8*(x*b+y*p); else if(b<5 && p>=2) ans=min(x*b+y*p,0.8*(x*5+y*p)); else if(b>=5 && p<2) ans=min(x*b+y*p,0.8*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124848/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(65<=N && 90>=N){ printf("1\n"); } else if(97<=N && 122>=N){ printf("2\n"); } else{ printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); if(30<=X){ printf("Yes"); }else{ printf("No"); }return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124956/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a1[6],i,max; scanf("%d%d%d",&a,&b,&c); a1[0]=a+b+c; a1[1]=(a+b)*c; a1[2]=a+b*c; a1[3]=a*b+c; a1[4]=a*(b+c); a1[5]=a*b*c; max=a1[0]; for(i=0;i<6;i++){ if(a1[i]>max) max=a1[i];} printf("%d",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 cons...
#include<stdio.h> #include<math.h> int main() { int x; scanf("%d",&x); if(x>=30&&x<=40) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125041/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; do{scanf("%d",&x);}while(x < -40 || x > 40); if(x >=30) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125085/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=-40)&&(x<=40)) { if(x>=30) { printf("Yes\n"); } else { printf("No\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125128/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&a); if(a>=30)printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125214/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125258/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0; scanf("%d",&x); printf("%s\n",((x>=30)?"Yes":"No")); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125300/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 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_125344/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125344/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,b; int n, m, k; char s[4], t[20]; scanf("%d", &i); if (i >= 30) { printf("Yes"); return 0; } printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125388/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int data[1010][101]; int result[101] = {}; int idx; int i, j; while(scanf("%d %d", &n, &m), n || m) { for(i = 0; i < 101; i++) result[i] = 0; for(i = 0; i < n; i++) { for(j = 0; j < m; j++) { scanf("%d", &data[i][j]); result[j] += data[i][j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125438/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125438/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) void update(int64 *bit,int index,int64 v){ int n=bit[0]; for(int i=index;i<=n;i+=i&-i) bit[i]=MAX(bit[i],v); } int64 getMax(int64 *bit,int index){ int64 res=0; for(int i=index;i>0;i-=i&-i) res=MAX(res,bit[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125517/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int a[1005]; int main(void) { int i, j, cost[1005], n, m, b; int ans; scanf("%d %d", &n, &m); for (i = 0; i < n; i++){ scanf("%d", &cost[i]); } for (i = 0; i < m; i++){ scanf("%d", &b); for (j = 0; j < n; j++){ if (cost[j] <= b){ a[j]++; break; } } } ans = 0; fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125568/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, dataa[1000], datab[1000], datac[1000]; int result, output; scanf("%d %d",&n, &m); for(j=0; j<n; j++) { scanf("%d",&datab[j]); datac[j] = 0; } for(i=0; i<m; i++) { scanf("%d",&dataa[i]); } for(j=0; j<m; j++) { for(i=0; i<n; i++) { if(datab[i] <=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125610/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdlib.h> #include <stdio.h> #define N 200000 int arr[N]; int cmp(const void *a, const void *b) { return *(const int *) b - *(const int *) a; } int main(void) { int n; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &arr[i]); qsort(arr, n, sizeof arr[0], cmp); long long int ans = arr[0];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125654/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125704/source.c" target datalayout = "e-m:e-p270: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.sd = type { i32, i3...
// AOJ 2028: Gather on the Clock // 2017.11.03 bal4u@uu #include <stdio.h> #include <string.h> int a[102]; int dp[102][102]; int main() { int cno, n, i, j, k, s, t, v, ans; scanf("%d", &cno); while (cno--) { scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", a+i); memset(dp, 0, sizeof(dp)); for (k = 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10] = "a"; scanf("%s", S); if(S[0] == 'h'&& S[1] == 'i' &&S[2] == '\0'&& S[3] == '\0'&&S[4] == '\0'&& S[5] == '\0'&&S[6] == '\0'&& S[7] == '\0'&&S[8] == '\0'&& S[9] == '\0') printf("Yes"); else if(S[0] == 'h'&& S[1] == 'i' &&S[2] == 'h'&& S[3] == 'i'&&S[4] == '\0'&& S...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125863/source.c" target datalayout = "e-m:e-p270: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.S = private u...
#include <stdio.h> #include <string.h> int main(void) { char string[10]; int len = 0; int flag = 0; int i; scanf("%s", string); len = strlen(string); if (len % 2 == 1) printf("No\n"); else { for (i = 0; i < len; i += 2) { if (string[i] == 'h' && string[i + 1] == 'i'); else { flag++; } } i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125906/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> long long cmpfunc (const void * a, const void * b) { return ( *(long long*)a - *(long long*)b ); } long long int w; long long int find(long long int m,long long int l,long long int i){ if((((i*(i+1))/2)-(m-i))==l){ // printf("%lld ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12595/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int n, y, i, j, a=-1, b=-1, c=-1; scanf("%d%d", &n, &y); for (i = 0; i <= n; i++) { for (j = 0; i+j <= n; j++) { int z = n - i - j; if ((i * 10000 + j * 5000 + z * 1000) == y) { a = i; b = j; c = z; break; } i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125993/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125993/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j; scanf("%d %d",&n,&y); for(i=0;i<=n;i++){ for(j=0;j<=(n-i);j++){ if(10000*i+5000*j+1000*(n-i-j)==y){ printf("%d %d %d",i,j,n-i-j); return 0; } } } printf("-1 -1 -1"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126035/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126035/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n, y;; int i,j,k; scanf("%d%d", &n, &y); for(i = 0; i <= n; i++){ for(j = 0; j <= (n-i); j++){ for(k = 0; k <= (n-i-j); k++){ if(10000*i+5000*j+1000*k == y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> enum STATUS {NOTFIN, FIN}; int main(){ int n, y; enum STATUS s = NOTFIN; int result[3], p0, p1, p2; scanf("%d %d", &n, &y); if(n < 1 || 2000 < n || y < 1000 || 20000000 < y || (y%1000)) return 1; for(p0 = 0; p0 <= n + 1; p0++){ if(s == NOTFIN){ for(p1 = 0; p1 <= n - p0; p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126121/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...