Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<string.h> #include<stdio.h> int main(void) { char s[100]; scanf("%s",s); int i,a; a = strlen(s); for(i = 0 ; i < a ; i++) { s[i] = 'x'; } printf("%s\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123350/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[101]; int len=0; scanf("%s",s); len=strlen(s); for(int i=0;i<len;i++) { printf("x"); }; return 0; };
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123394/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[101]={0}; int ans; scanf("%s", s); ans = strlen(s); for(i = 0; i < ans; i++) { printf("x"); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123437/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; int i; scanf("%s", s); for( i = 0; s[i] != '\0'; i++ ){ if( s[i] != 'x' ){ s[i] = 'x'; } printf("%c", s[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123480/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123480/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 main(void) { char str_s[101]; char ans[101]={0}; int l; int i; //printf("%d", (int)log10(9)); scanf("%s", str_s); l = strlen(str_s); for(i=0; i<l; i++) { ans[i] = 'x'; } printf("%s\n", ans); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123523/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123523/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[101]; scanf("%s",s); int l=strlen(s); for(int i=0;i<l;i++) printf("x"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123567/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123567/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[255]; int i,len; scanf("%s",s); for (i=1;i<=strlen(s);i++) printf("x"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123653/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123653/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; scanf("%s", s); int n; n = strlen(s); for(int i = 0; i < n; i++){ s[i] = 'x'; } printf("%s", s); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123703/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> #include<string.h> #include<math.h> #define mprint(x) printf(FORMATCONVERSION(x),(x)) #define FORMATCONVERSION(x) _Generic((x),\ int:"%d",unsigned int:"%u",\ double:"%lf",long long int:"%lld"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s; if(A>B){ s=s+A; A=A-1; } else{ s=s+B; B=B-1; } if(A>B){ s=s+A; } else{ s=s+B; } printf("%d\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123798/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0,i=0,b=0,soma=0; scanf("%d%d",&a,&b); for(i=0;i<2;i++) { if(a>b) { soma+=a; a--; } else if(b>a) { soma+=b; b--; } else if(b==a) { soma+=b; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123840/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { A+=(A-1); printf("%d\n",A); } else if(B>A) { B+=(B-1); printf("%d\n",B); } else if(A==B) { printf("%d\n",A+B); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123884/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, sum; scanf("%d%d", &a, &b); sum=0; for(i=0;i<2;i++){ if(a>=b){ sum+=a; a--; } else{ sum+=b; b--; } } printf("%d", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 total=0; scanf("%d%d",&a,&b); for(int i=1;i<=2;i++) { if(a>=b) { total+=a; a--; }else{ total+=b; b--; } } printf("%d\n",total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_123978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_123978/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ int t,i,j,k,n,temp; scanf("%d",&t); int res[t]; for(i=0;i<t;i++){ scanf("%d",&n); int arr[n]; for(j=0;j<n;j++) scanf("%d",&arr[j]); for(j=0;j<n;j++){ for(k=0;k<n-j-1;k++){ if(arr[k]>arr[k+1]){ temp = arr[k]; arr[k] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12402/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12402/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <ctype.h> #include <string.h> #include <math.h> #define SWAP(a, b) a = a ^ b; b = a ^ b; a = a ^ b void swap(int * a, int * b) { int temp = *a; *a = *b; *b = temp; } void print_int(int n) { printf("%d\n",n); } void sort(int a[], int n) { int h, i, j; for(h =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124063/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int ans=0; if(a>=b){ ans=ans+a; a--; }else{ ans=ans+b; b--; } if(a>=b){ ans=ans+a; a--; }else{ ans=ans+b; b--; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124106/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124106/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 code[3][6]; int save[1800]; int index = 0; memset(code , 0 , sizeof(int) * 18); memset(save , 0 , sizeof(int ) * 1800); int n; scanf("%d" , &n); for(int i = 0 ; i < n ; i++){ for(int j = 0 ; j < 6 ; j++){ scanf("%d" , &code[i][j]); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12415/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12415/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { char str[150]; scanf("%s",str); int length=strlen(str); int f1=length-1; for(int i=0;i<length;i++) { if(str[i]=='1') { f1=i; break; } } int n0=0; for(int i=f1;i<length;i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12420/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12420/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 argc, char const *argv[]) { int a,b; scanf("%d %d",&a,&b); int count=0; if (a>=b) { count=count+a; a=a-1; }else{ count+=b; b--; } if (a>=b) { count=count+a; a=a-1; }else{ count+=b; b--; } printf("%d\n",count); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124243/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124243/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0; scanf("%d %d", &a, &b); for (int i = 0; i < 2; i++) { if (a < b) { c = c + b; b = b - 1; } else { c = c + a; a = a - 1; } } printf("%d", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124287/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int a[7][7]; int ju[10][10],n,book[5]; int ans[1001]={0}; int judge(int k,int m) { int i; if (k<=9) for (i=1;i<=n;i++) if (ju[i][k]==1&&book[i]==1) { ans[m]=1; return 0; } if (k<=99) for (i=1;i<=n;i++) if ((j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12433/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ans = dso_local local_unname...
#include <stdio.h> int main(void) { int a, b; int sum = 0; scanf("%d%d", &a, &b); if(a > b) { sum = a; a--; } else { sum = b; b--; } if(a > b) { sum += a; } else { sum += b; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124373/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct{ char tango[31]; int page; }dictionaly; int main(void) { int i,j,n; dictionaly dic[100],tmp; for(n = 0;~scanf("%s %d",dic[n].tango,&dic[n].page);n++); for(i = 0;i < n-1;i++){ for(j = i+1;j < n;j++){ if((strcmp(dic[i].tango,dic[j].tango)>0) || (!strc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124416/source.c" target datalayout = "e-m:e-p270: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.dictionaly = type {...
#include <stdio.h> #include <string.h> struct Dex{ char word[31]; int page[1000]; int n; } dex[128]; int main(){ int p, i, j = 0, k, l, tmp, min; char w[31]; while(scanf("%s%d", w, &p) != EOF){ for(i = 0;i < j;i++) if(strcmp(dex[i].word, w) == 0) break; if(i == j){ strcpy(dex[j++].word, w); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124467/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124467/source.c" target datalayout = "e-m:e-p270: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.Dex = type { [31 x ...
// Aizu Vol-1 0113: Period // 2017.8.2 #include <stdio.h> #include <stdlib.h> #include <ctype.h> char *gets(char *); char buf[100], *p; int getInt(void) { int n = 0; while (isspace(*p)) p++; while (isdigit(*p)) n = 10 * n + (*p++ - '0'); return n; } #define MAX 1000000 int rr[MAX + 1]; int main() { int a, b, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124517/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @p = dso_local local_unname...
#include<stdio.h> #include<string.h> #include<math.h> long long int a[3002][3002]; int main() { char s[3030],t[3030],u[3030]; long long int i,j,len1,len2,c=0; scanf("%s%s",s,t); len1=strlen(s); len2=strlen(t); //int a[len1+1][len2+1]; for(i=0;i<=len1+1;i++) for(j=0;j<=len2+1;j++) a[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124568/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){return a<b?b:a;} int i,j,c=1,d[3010][3010],f[3010][3010]; int main(){ char a[3010],b[3010],s[3010]={}; scanf("%s %s",a,b); for(i=0;a[i];i++){ for(j=0;b[j];j++){ if(a[i]==b[j]){ d[i+1][j+1]=d[i][j]+1; f[i+1][j+1]=3; } if(d[i+1][j+1]<d[i+1][j]){ d[i+1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124610/source.c" target datalayout = "e-m:e-p270: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_unname...
#include <stdio.h> int main(){ int n,m,zekken[100],blank,i,j; scanf("%d %d",&n,&m); for(i = 0; i < n; i++){ scanf("%d",&zekken[i]); } for(j = 0; j < m; j++){ for(i = 0; i < n-1; i++){ if(zekken[i]%(j+1) > zekken[i+1]%(j+1)){ blank=zekken[i]; zekken[i]=zekken[i+1]; zekke...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124654/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<math.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) #define POS(i,j) ((i)*n+(j)) void run(void){ int n,m; scanf("%d%d",&n,&m); const int inf=100000+1; int cost[10000]; int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124704/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define MAX(a,b) (a>b?a:b) int main() { long long int i, n, p, ans; scanf("%lld %lld",&n, &p); long long start = (long long)( pow(p, (double)1.0/n) + 0.1 ); for(ans=start; p % (long long)pow(ans,n) != 0; ans--); //if(n==1 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124762/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 fee(int x, int y, int b, int p) { int fee1, fee2; fee1 = x * b + y * p; if (b >= 5 && p >= 2){ return ((x * b + y * p) * 4 / 5); } if (b < 5 && p >= 2){ fee2 = (x * 5 + y * p) * 4 / 5; if (fee1 < fee2){ return (fee1); } return (fee2); } if (b >= 5 && p < 2){ fee2 = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int n; scanf("%d", &n); int x[n]; int y[n]; int b[n]; int p[n]; for(int i = 0; i < n; i++){ scanf("%d", &x[i]); scanf("%d", &y[i]); scanf("%d", &b[i]); scanf("%d", &p[i]); } for(int i = 0; i < n; i++){ int l = (x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124863/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=65 && n<=90){ printf("1\n"); } else if(n>=97 && n<=122){ printf("2\n"); } else{ printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_124906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124906/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main() { int n,i; int ss[110]; scanf("%d",&n); for(i=1;i<=n;i++) { scanf("%d",&ss[i]); } int sum,flag; sum=0; flag=0; for(i=1;i<=n;i++) { if (ss[i]==1) { sum++; flag...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12495/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> signed main(){ 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_124993/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_124993/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 || X==30) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125035/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125035/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; scanf("%d",&t); if(t>=30){puts("Yes");} else{puts("No");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; scanf("%d",&t); if(t>=30) { printf("Yes"); } else { printf("No"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125121/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { long long int n,d,i,c=0,x,y; scanf("%lld",&n); if(n>=30) { printf("Yes\n"); } else { printf("No\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125165/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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||n==30) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125208/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(x >= 30){ printf("Yes"); }else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125251/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125251/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); (t >= 30)? printf("Yes") : printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125295/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125295/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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"); else printf("No"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125338/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0; scanf("%d",&a); if(a>=30)printf("Yes"); else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125381/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125381/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j,c,n,a[1000][100]; int b[100]; while(1){ c=0; scanf("%d %d",&n,&m); if(n==0&&m==0) break; for(j=0;j<m;j++) b[j]=0; for(i=0;i<n;i++) for(j=0;j<m;j++) scanf("%d",&a[i][j]); for(j=0;j<m;j++) for(i=0;i<n;i++) b[j]=b[j]+a[i][j]; for(i=1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 searchA(int s[],int key,int head,int tail){ if(head>tail)return -1; int mid=(head+tail)/2; if(s[mid]==key){ if(mid-1<0||s[mid-1]!=key)return mid; else tail=mid-1; } else if(s[mid]>key)tail=mid-1; else if(s[mid]<key)head=mid+1; return sea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125497/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125497/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i, j, min, max; scanf("%d %d", &n, &q); char s[200001]; scanf("%s", s); char t[200001], d[200001]; for(i = 0; i < q; ++i) { scanf("\n%c %c", &t[i], &d[i]); } for(i =q-1, min = 0, max = n-1; i >= 0; --i) { switch(d[i]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125547/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125547/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s[a];//??¶???????????? int t[b];//??????????????? int x=0; int y=0; int u[a]; int i,j; for (i=0;i<a;i++){ scanf("%d",&s[i]); u[i]=0; } for(i=0;i<b;i++){ scanf("%d",&t[i]); } for (i=0;i<b;i++){ for (j=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125604/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125604/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> typedef struct { int key, id; } data; typedef struct { data obj[200001]; int size; } max_heap; void push(data x, max_heap* h) { int i = ++(h->size); data tmp; h->obj[i] = x; while (i > 1) { if (h->obj[i].key > h->obj[i>>1].key) { tmp = h->obj[i>>1]; h->obj[i>>1] = h->obj[i]; h->o...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125648/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.max_heap = type { [...
#include<stdio.h> #include<stdlib.h> int cmp(const void *a, const void *b){return *(int*)b-*(int*)a;} int N, A[200200]; long ans = 0; int main(){ scanf("%d",&N); for(int i=0; i<N; i++)scanf("%d",&A[i]); qsort(A, N, 4, cmp); for(int i=1; i<N; i++){ ans += A[i/2]; } printf("%ld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125699/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125699/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ans = dso_local local_unna...
#include<stdio.h> #include <string.h> int main(void){ char str[1000]; int i,l; fgets(str,1000,stdin); l=strlen(str); for(i=0;i<l;i++){ if(str[i]=='p' && str[i+1]=='e'&&str[i+2]=='a'&&str[i+3]=='c'&&str[i+4]=='h'){ str[i]='a'; str[i+1]='p'; str[i+2]='p'; str[i+3]='l'; str[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125749/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125749/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include<stdio.h> int main() { int t,a,b,i,j; scanf("%d",&t); while(t--) { scanf("%d %d",&a,&b); for(i=0;i<a;i++) { for(j=0;j<b;j++) { if(i==a-1&&j==b-1) printf("W"); else printf("B"); } printf("\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1258/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> #include <string.h> int main() { char d[11]; int v = 0; scanf("%s", d); for (int i=0; i<strlen(d); i = i + 2) { if (d[i] != 'h' || d[i+1] != 'i') { v = 0; break; } if (d[i] == 'h' && d[i+1] == 'i') v ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125842/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10]; int i,count,strnum; count=0; scanf("%s",&str); strnum=strlen(str); for(i=0;i<strnum;i++){ if(str[i]=='h'){ if(str[i+1]=='i'){ count++; count++; } } } if(count==strnum){ printf("Yes"); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125893/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N; long long Y; scanf("%lld %lld", &N, &Y); long long i, j, k; long long p=0, a, b; for (i=0; i<= N; i++){ for (j=0; j<= N-i; j++){ if (10000*i + 5000*j + 1000*(N-i-j) == Y) {p=1; a=i; b=j;} } } if (p==1) {printf("%lld ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_125936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_125936/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int n, k; scanf("%d %d", &n, &k); int arr[n]; int arr2[k]; int ctr=n; int out; for (int i=0; i<=k; i++){ arr2[i]=0; } for (int i=0; i<n; i++){ scanf("%d", &arr[i]); if (arr2[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12598/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int x = 0; int y = 0; int z = 0; int i = 0; int j; int n, yen; scanf("%d%d",&n, &yen); if (n * 1000 == yen) { printf("%d %d %d\n", x, y, n); return (0); } else if (n * 5000 == yen) { printf("%d %d %d\n", x, n, z); return (0); } else if (n * 10000 == yen) { p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; int z = -1; for(int i = 0; i <= n && z == -1; i++){ for(int j = 0; j <= n - i; j++){ if(i * 10000 + j * 5000 + (n - i - j) * 1000 == y){ x = i; y = j; z = n - i - j; break; } } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, y, i, j, k; int ans1=-1, ans2=-1, ans3=-1; scanf("%d%d", &n, &y); for(i=0;i<=n;i++){ for(j=0;j<=n-i;j++){ k=n-i-j; if(i*10000+j*5000+k*1000==y){ ans1=i; ans2=j; ans3=k; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); y /= 1000; int a, b, c; for (a = 0; a <= n; a++) { for (b = 0; b <= n - a; b++) { c = n - a - b; if (10 * a + 5 * b + c == y) { printf("%d %d %d\n", a, b, c); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int i, g, s; int n, y; int x = 0; scanf("%d%d", &n, &y); for (i = n; i >= 0; i--) { if (y == 10000 * i) { if (i == n) { printf("%d 0 0 ", i); x = 1; goto out; } } if (10000 * i < y) { for (g = n - i; g >= 0; g--) { if (10000 * i + 5000...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126201/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126201/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, Y, i, man, gosen, sen; scanf("%d %d", &N, &Y); Y /= 1000; for (man = 0; man <= N; man++){ for (gosen = 0; gosen <= N - man; gosen++){ sen = N - gosen - man; if (man * 10 + gosen * 5 + sen == Y) { prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126252/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void main() { int k=0,i,j,n,m,prime[25]; for(i=2;i<=50;i++) { for(j=2;j<=sqrt(i);j++) { if(j==i) continue; if(i%j==0) break; } if(j>sqrt(i)) prime[k++]=i; } scanf("%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12631/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12631/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 gdc(int i, int j, int k) { int c = 0; int tmp = 0; /*iが大きくなるように並び替える*/ if (i < j) { tmp = i; i = j; j = tmp; } c = i % j; /*iとjの最大公約数を求める*/ while (c > 0) { i = j; j = c; c = i % j; } /*i,jの最大公約数jと,kから、これらの最大公約数を求める*/ /*kの方が大きければ入れ替える*/ if (j < k) { tmp = j; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126375/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126375/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c) { if (a >= b && a >= c) { return a; } else if (b >= a && b >= c) { return b; } else { return c; } } int gcd(int a, int b, int c, int g) { int a_ = a%g; int b_ = b%g; int c_ = c%g; if (a/g*g - a == 0 && b/g*g - b == 0 && c/g*g - c == 0) { r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126418/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126418/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c) { int min = a; if(a<b&&a<c) { min = a; } if(b<a&&b<c) { min = b; } if(c<a&&c<b) { min = c; } for(int i=min;0<i;i--) { if(a%i==0&&b%i==0&&c%i==0) { return i; } } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { while(a!=b) { if(a>b) a-=b; else b-=a; } return a; } int main() { int a,b,c,k,sum=0; scanf("%d",&k); for(a=1;a<=k;a++) { for(b=1;b<=k;b++) { for(c=1;c<=k;c++) su...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ if(y==0){ return x; }else{ return gcd(y,x%y); } } int main(void){ int i,j,k,n; int sum = 0; scanf("%d",&n); for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126562/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 func(int a, int b) { int tmp; int 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 main() { int n; scanf("%d",&n); int i = 1; int j = 1; int k = 1; int sum = 0; while (i <= ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, int); int main() { int num; int sum = 0; scanf("%d", &num); for( int i = 1; i <= num; i++ ){ for( int j = 1; j <= num; j++ ){ for( int k = 1; k <= num; k++ ){ sum += gcd(gcd(i,j),k); } } } printf("%d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,temp=1; if(a==0) return b; else if(b==0) return a; else { while(b!=0) { temp=b; b=a%b; a=temp; } return a; } } int main() { int a,i,j,k,x; long long int sum=0; sca...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> static unsigned long int gcd(unsigned int a, unsigned int b) { if (a > b) { unsigned int temp = a; a = b; b = temp; } if (a == 0) { return b; } b = b % a; return gcd(b, a); } int main(void) { unsigned int k; scanf("%u", &k); unsi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126735/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #define VERYBI...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126779/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hwll = type { i64, ...
#include<stdio.h> #include<string.h> #include<stdlib.h> int c(const void *x,const void *y){return *(int*)x-*(int*)y;} int t[10005],i,n; long long w[10005],s,r; int main() { for(;scanf("%d",&n),n;) { memset(t,0,sizeof(t)); memset(w,0,sizeof(w)); for(i=0;i<n;i++) scanf("%d",&t[i]); qsort(t,n+1,4,c); for(i=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126821/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define NUM 200000 long absl(long a) { return a >= 0 ? a : - a; } void print_array(long *a, long size) { for(int i = 0; i < size; i++) { printf("%ld\n", a[i]); } } int compare_int(const void *a, const void *b) { return *(int*)a - *(int*)b; } long medi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126894/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,x,n,q,a,v,aaa=0,vvv=0,vv[9000],f[1000001],prev[1000001],next[1000001]; int main(void){ scanf("%d %d",&n,&q); for(i=0;i<=n;i++){f[i]=0;prev[i]=0;next[i]=0;} for(i=0;i<9000;i++)vv[i]=0; for(;q>0;q--){ scanf("%d %d",&a,&v); x=f[a]; if(x>0){ if(vv[x]==a){ if(next[a]>0){vv[x]=ne...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126944/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126944/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @aaa = dso_local local_unna...
#include <stdio.h> #include <string.h> int main() { char str[100001]; scanf("%s",str); for(int i=0;i<strlen(str);i++){ if((i+1)%2==1) printf("%c",str[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_126988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_126988/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<malloc.h> //typedef struct node{ //int data; //struct node* next; //}node; # define PLI(i) printf("%d",i) # define PLC(i) printf("%c",i) # define NL printf("\n") # define PLS(i) printf("%s",i) # define PI 3.141592 # define MAX(i,j) ((i>j)? i : j) int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12703/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807 #define PI 3.14159265358979323846; #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<n;i++) #de...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127080/source.c" target datalayout = "e-m:e-p270: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<string.h> int main() { int i; char str[100000]; while(scanf("%s",str)!=EOF) { for(i=1;i<=strlen(str);i++) { if(i%2==1) { printf("%c",str[i-1]); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127123/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[200000]; char new[200000]; int len,i; fgets(str,200000,stdin); len = strlen(str); for(i = 0;i < len/2;i++) new[i] = str[2*i]; new[i] = '\0'; printf(new); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127181/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127181/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #define DEBUG 0 typedef struct { int a; int b; int c; } Menu; int compare(const void *a,const void *b) { return ((Menu *)b)->c - ((Menu *)a)->c; } int main(void) { Menu *menu; int n,*a,*b,*c,i; long ans=0; scanf("%d",&n); menu = (Menu *)malloc(sizeof(Menu) * (n + (n%2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127224/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127224/source.c" target datalayout = "e-m:e-p270: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.Menu = type { i32, ...
#include<stdio.h> int main() { int i,s; char A[10000]; while(1) { scanf("%s",A); s=0; if(A[0]=='0') { break; } else { for(i=0;A[i]!='\0';i++) { s+=A[i]-'0'; } } printf("%d\n",s); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127275/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127275/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b; int n = 0; while(scanf("%c", &b) != EOF){ if(b == '\n') { if(n == 0) break; printf("%d\n", n); n = 0; } else{ n += b - '0'; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127318/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(int argc, char **argv){ int c; int x; for(;;){ // Input & CountUp x = 0; for(;;){ c = getchar(); // EOL/EOF Check if( c == EOF || c == '\n' ){ break; } // Number Check if( !isdigit(c) ){ continue; } // Convert & CountUp x += (c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127383/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127383/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s=0,i,n=0; char c[1010]; while(1){ scanf("%s",&c); if(c[0]=='0'){ break; } n=strlen(c); for(i=0;i<n;i++){ s+=c[i]-'0'; } printf("%d\n",s); s=0; n=0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127433/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x[1001]; int i,z; do { i=0;z=0; scanf("%s",x); if (x[0] != '0') { for (i = 0; x[i] != '\0'; i++) { z += x[i]-'0'; } printf("%d\n", z); } }while (x[0] != '0'); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127477/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127477/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdbool.h> #include <assert.h> #define MAX 1010 #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) int n, dis[MAX][MAX]; void floyd_warshall(){ int k, i, j; for (k = 1; k <= n; k++){ for (i = 1; i <= n; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12752/source.c" target datalayout = "e-m:e-p270: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 i32 0, ...
#include<stdio.h> int main() { char c[1000]; int i,x; int sum; int co; while(1){ co=0; sum=0; scanf("%s",&c); for(i=0;;i++){ if(c[i]=='\0'){ co=i; break; } } if(c[0]=='0')break; for(i=0;i<co;i++){ x =c[i]-'0'; sum+=x; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127570/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127570/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num[1001]; int a, sum; while(1){ scanf("%s" ,num); if(num[0]=='0')break; sum = 0; for(a = 0;num[a]!='\0';a++){ sum+=num[a]-'0'; } printf("%d\n" ,sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127613/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127613/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 line[1001]; int i,sum; for(;sum=0,i=0,scanf("%s",line),line[0] != '0';){ while(line[i]) sum+=line[i++]-'0'; printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127671/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127671/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 number[1001]; int i,sum=0,c; while (1) { scanf("%s",number); if (number[0]=='0') { break; } sum=0; for (i=0; number[i]!='\0'; i++) { c=number[i]-'0'; sum+=c; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num[1001]; int len,x,m,sum,n,i; for(;;){ sum=0; scanf("%s",num); len=strlen(num); if(strcmp(num,"0")==0)break; for(i=0;i<len;i++){ sum+=(int)num[i]-48; } printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127765/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 number[100000]; int total = 0; int i; while (1) { for (i = 0; i < 100000; i++) { scanf("%c", &number[i]); if ((i==0&&number[i] == '0') || number[i] == '\n') break; total += number[i] - '0';...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 in[1001]; int out, i; for (;;) { scanf("%s", in); if (in[0] == '0') { return 0; } out = 0; for (i = 0; in[i] != '\0'; i++) { out += in[i] - '0'; } printf("%d\n", out); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127873/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127873/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sum(char a[1000]){ int i = 0; int sum = 0; while (a[i] != '\0'){ sum += a[i] - '0'; i++; } return sum; } int main(void){ char x[1000]; while (1) { scanf("%s", x); if(x[0] == '0'){ break; } printf("%d\n", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127916/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127916/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void) { char i[1000]; int count; int sum; while(1){ count = 0; sum = 0; scanf("%s", i); if(i[0] == '0') break; do{ sum += (int)i[count] - 48; //printf("%ld\n",i%10); count++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_127974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_127974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int i, sum; char s[1001]; while(1){ scanf("%s", s); if(*s == '0') break; sum = 0; for (i = 0; s[i] != '\0'; i++) { sum += s[i] - '0'; } printf("%d\n", sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> char s[100005]; int a[5]; int main() { int i,ans=0; for (i=1;i<=4;i++) scanf("%d",&a[i]); scanf("%s",s); for (i=0;i<strlen(s);i++) ans+=a[s[i]-'0']; printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12806/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12806/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...