Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(void){ int n, s; scanf("%d %d", &n, &s); int m=s; for (int i=0; i<n; i++){ int f, t; scanf("%d %d", &f, &t); int b=f+t; if (b > m) m = b; } printf("%d\n", m); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16185/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16185/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void){ int N,A,B; scanf("%d",&N); if(N==1) printf("Hello World\n"); else if(N==2){ scanf("%d %d",&A,&B); printf("%d\n",A+B); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161893/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int N,A,B,sum; scanf("%d",&N); if(N==1) { printf("Hello World"); } else if(N==2) { scanf("%d%d",&A,&B); sum=A+B; printf("%d",sum); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_161936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_161936/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[200005],b[200005]; long long int x[200005]={0},y[200005]={0}; int main() { scanf("%s%s",a,b); int i,l=strlen(b),p=strlen(a); long long int s=0; if(b[0]=='0') { x[0]=1; y[0]=0; } else { x[0]=0; y[0]=1; } f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16198/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @x = dso_local local_unnamed_...
#include<stdio.h> int main(){ int n; int a, b; scanf("%d", &n); if(n == 1){ printf("Hello World\n"); }else if (n==2){ scanf("%d", &a); scanf("%d", &b); printf("%d\n", (a+b)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int N = 0; scanf("%d",&N); if(N == 1){ printf("Hello World\n"); }else if(N == 2){ int A= 0, B = 0; scanf("%d",&A); scanf("%d",&B); printf("%d\n",(A+B)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162072/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162072/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b; scanf("%d", &n); if (n == 1) { puts("Hello World"); } else { scanf("%d", &a); scanf("%d", &b); printf("%d\n", a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162115/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162115/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <ctype.h> #include <float.h> #include <inttypes.h> #include <limits.h> #include <signal.h> #include <stdarg.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162159/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162159/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i...
#include<stdio.h> #include<stdlib.h> int main() { int n = 0; int i, j; int a[200020] = {0}; int x = 0; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d", &(a[i])); x = (x ^ a[i]); } for (j = 0; j < n; j++) { printf("%d ", (x ^ a[j])); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162216/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> #include<limits.h> #define MOD 1000000007 #define PI 3.14159265 #define seive_len 1 typedef long long int lli; int *array; int seive[seive_len]; long long int min(long long int a, long long int b) { return a<b?a:b; } long long int max(long...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162267/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162267/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @array = dso_local local_un...
#include<stdio.h> void min_three(long int a,long int b,long int c){ long int ans = a * b; if(ans >= b * c){ ans = b * c; } if(ans >= a * c){ ans = a * c; } printf("%ld\n",ans); } int main(void){ long int A,B,C,i; scanf("%ld %ld %ld",&A,&B,&C); if(A % 2 == 0 || B...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162317/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ unsigned long long int a,b,c; unsigned long long int l,m,s; scanf("%llu%llu%llu",&a,&b,&c); if(a>=b && a>=c){ l=a; m=b; s=c; }else if(b>=c && b>=a){ l=b; m=a; s=c; }else if(c>=b && c>=a){ l=c; m=b; s=a; } if(l%2==0||m%2==0||s%2==0){ puts("0"); }else{ p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162360/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162360/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int h,w,i,j; while(1){ scanf("%d %d",&h,&w); if((h==0)&&(w==0))break; for(i=0;i<h;i++){ if((i==0)||(i==h-1)){ for(j=0;j<w;j++){ printf("#"); } printf("\n"); }else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int H,W; int i,j; while(1){ scanf("%d %d",&H,&W); if(H==0&&W==0)break; for(i=0;i<H;i++){ for(j=0;j<W;j++){ if(i==H-1||i==0||j==0||j==W-1){ printf("#"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int h,w,i,j; while(1){ scanf("%d%d",&h,&w); if(!h&&!w) return 0; for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(i==0||i==h-1||j==0||j==w-1) printf("#"); else printf("."); } printf("\n"); } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int h,w,i,j; while(1){ scanf("%d%d",&h,&w); if(h == 0 && w == 0) break; for(i = 0 ; i < h ; i++){ for(j = 0 ; j < w ; j++){ if(i != 0 && j != 0 && i != h-1 && j != w-1) printf("."); else printf("#"); } printf("\n"); } printf("\n"); } re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162548/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int h, w; int i, j; while (1) { scanf("%d %d", &h, &w); if (h == 0 && w ==0) break; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if (i == 0 || i == h-1) { putchar('#'); } else if (j == 0 || j == w-1) { putchar('#'...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int h; int w; while(1) { scanf("%d%d", &h, &w); if(h == 0 && w == 0) return(0); int i; for(i = 0; i < h; i++) { int j; for(j = 0; j < w; j++) { if((i == 0 || i == h-1) || (j == 0 || j == w-1)) putchar('#'); else putchar('.'); } if(i < h-1) p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int h, w, i1, i2; while (1){ scanf("%d %d", &h, &w); if (h == 0 && w == 0){ break; } else { for (i1 = 0; i1 < w; i1++){ printf("#"); } printf("\n"); for (i1 = 0; i1 < h-2; i1++){ printf("#"); for (i2 = 0; i2 < w-2; i2++){ printf(".")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &n); int** arr = (int **)malloc(n*sizeof(int*)); int min =100, t; for(int i = 0 ; i < n; i++) { int c; scanf("%d", &c); if (c <= min){ min = c; t = i; } arr[i] = (int*)malloc((c+1) * 4); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16275/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16275/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <math.h> #include <string.h> #define N (600000) char isPrime[N]; int makePrime(void) { int i, j; int lim; memset(isPrime, 0, sizeof(isPrime)); lim = sqrt(N); for (i = 2; i < lim; i++){ for (j = i * i; j < N; j += i){ isPrime[j] = 1; } } return (0); } int main(void) { int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162814/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162814/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @isPrime = dso_local local_...
#include <stdbool.h> #include <stdio.h> int main() { int n, a[100000], cnt = 1; bool isup; bool issame = false; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } if (a[0] < a[1]) isup = true; else if (a[0] > a[1]) isup = false; else issame = true; for (int i = 1; i < n - 1; i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162858/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162858/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 test(int a, int n){ // printf("(%d, %d)\n", a, n); if(n<=0) return 1; int b=a; do{ a=b; scanf("%d", &b); n--; }while(a==b && n>0); if(n==0) return 1; if(a>b){ do{ a=b; scanf("%d", &b); n--; }while(a>=b && n>0); if(a>=b && n==0) return 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162900/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162900/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 struct time{ int a; int b; } time; int cmp(const void *x, const void *y) { return (*(time *)x).b - (*(time *)y).b; } int main() { int n; long int sum = 0; scanf("%d", &n); time t[n]; for (size_t i = 0; i < n; i++) { scanf("%d %d", &(t[i].a), &(t[i].b))...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162951/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162951/source.c" target datalayout = "e-m:e-p270: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.time = type { i32, ...
#include<stdio.h> #include <stdlib.h> typedef struct{ int a; int b; }TEST; int comp( const void *c1, const void *c2 ) { TEST test1 = *(TEST *)c1; TEST test2 = *(TEST *)c2; int tmp1 = test1.b; /* b を基準とする */ int tmp2 = test2.b; return tmp1 - tmp2; } int main(){ int N; TEST base[210000]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163000/source.c" target datalayout = "e-m:e-p270: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.TEST = type { i32, ...
#include <stdio.h> int main(){ int n, s=0; scanf("%i", &n); if(n%2==0){ if(n%10==2){ while(n!=0){ s=s+n%10; n=n/10; } } else{ n=n/2; while(n!=0){ s=s+n%10; n=n/10; } s=s*2; } printf("%i\n", s); } else{ n--; while(n!=0){ s=s+n%10; n=n/10; } s++; printf("%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 calc(int a,int b){ int sum=0; while(a>10){ sum =sum + a%10; a = a/10; } sum = sum + a; while(b>10){ sum = sum + b%10; b = b/10; } sum = sum +b; return sum; } int main() { int ans=1000000,N,sum[100000],i,a[100000],b[100000]; s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163088/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s=0; for(scanf("%d",&n);n;n/=10)s+=n%10; if(s==1)s=10; printf("%d\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163130/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163130/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%ld", &x); x = 1999-x; long ans = (x/200)+1; printf("%ld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163174/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163174/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i; scanf("%d",&a); if (400 <= a && 599 >= a) { printf("8\n"); } else if (600 <= a && 799 >= a) { printf("7\n"); } else if (800 <= a && 999 >= a) { printf("6\n"); }else if (1000 <= a && 1199 >= a) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=1800) printf("1"); else if(x>=1600) printf("2"); else if(x>=1400) printf("3"); else if(x>=1200) printf("4"); else if(x>=1000) printf("5"); else if(x>=800) printf("6"); else if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163260/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d\n", 10 - x / 200); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163303/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int N, i, sum=0; scanf("%d",&N); for(i=1; i<=N; i++) { sum = sum + i; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163354/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ame=0; scanf("%d", &N); for(int i=1;i<=N; i++) ame+=i; printf("%d", ame); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163398/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> signed main(){ int a,i,sum; scanf("%d",&a); sum=0; for(i=1;i<=a;i++){ sum=sum+i; } printf("%d\n",sum); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163440/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163440/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,a; scanf("%d",&N); for(i=1;i<=N;i++) a=a+i; printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163484/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163484/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int sum=0; for (; N > 0; N--) { sum+=N; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163527/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163527/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 f(int n) { if (n==0) return 0; return n+f(n-1); } int main(void) { int n; scanf("%d", &n); printf("%d\n", f(n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163570/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163570/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n,i,sum=0; scanf("%d",&n); for(i=1;i<=n;i++) sum=sum+i; printf("%d",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163613/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163613/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d",n*(n+1)/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163657/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163657/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,num[100],x,y,m,i,j,k; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&num[i]); scanf("%d",&m); i=0; while(i<m) { scanf("%d %d",&x,&y); if(x!=1) num[x-2]+=y-1; if(x!=n) num[x]+=num[x-1]-y; num[x-1]=0; i++; } for(i=0;i<n;i++) pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16370/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16370/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 n,i,s=0; scanf("%d",&n); for(i=1;i<=n;i++){ s=s+i; } printf("%d\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163765/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a; scanf("%d",&a); a=(a*(a+1))/2; printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int N,i,candies=0; scanf("%d",&N); if(N>=1 && N<=100) { for(i=1;i<=N;i++) { candies = candies+i; } } printf("%d\n",candies); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sum=0; int N; scanf("%d", &N); for (int i=1; i<=N; i++){ sum +=i; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int H,W; scanf("%d%d",&H,&W); char a[H][W]; for(int i=0;i<H;i++) scanf("%s",a[i]); long long int dp[H][W]; for(int i=0;i<H;i++) for(int j=0;j<W;j++) dp[i][j] = 0; dp[0][0] = 1; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ if(a[i][j]=='.'){ if(i<H-1&&a[i+1][j]=='.') dp[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n,k,l[51],i,j,tem,sum=0; scanf("%d",&n); scanf("%d",&k); for(i=0; i<n; i++) { scanf("%d",&l[i]); } for(i=0; i<n-1; i++) { for(j=0; j<n-1-i; j++) { if(l[j] < l[j+1]) { tem = l[j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n,k,m[100],i,j,t,s=0; scanf("%d%d",&n,&k); for(i=1;i<=n;i++) scanf("%d",&m[i]); for(i=2;i<=n;i++) { for(j=1;j<i;j++) { if(m[i]>m[j]) { t=m[j]; m[j]=m[i]; m[i]=t; } } } for(i=1;i<=k;i++) s=s+m[i]; printf("%d",s); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164030/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164030/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int compare(const void *a,const void *b){ return *(int*)b-*(int*)a; } int main(){ int N,K,l[60],i,max=0; scanf("%d%d",&N,&K); for(i=0;i<N;i++){ scanf("%d",&l[i]); } qsort(l,N,sizeof(int),compare); for(i=0;i<K;i++){ max+=l[i]; } printf("\n%d\n\n",max); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164081/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, char *argv[]) { int n, k; int l[50]; scanf("%d%d", &n, &k); for (int i = 0; i < n; i++) { scanf("%d", &l[i]); } for (int j = 0; j <= n - 2; j++) { for (int i = 0; i < n - 1 - j; i++) { int tmp; if (l[i] < l[i + 1]) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164131/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164131/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int N, K; int i, j; scanf("%d %d",&N,&K); int I[N]; for(i = 0; i < N; i++) { scanf("%d",&I[i]); } for(i = 0; i < N-1; i++) { for (j = N-1; j > i; j--) { if(I[i] > I[j]) { int tmp = I[i]; I[i] = I[j]; I[j] = tmp; } } } /* for(i = 0; i < N; i++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164182/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164182/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int compare(const void *a, const void *b) { return *(int*)b - *(int*)a; } int main(void) { int n,k; scanf("%d%d",&n,&k); int s[n]; int i; int ans=0; for (i=0; i<n; i++) { scanf("%d",&s[i]); } qsort(s,n,sizeof(int),compare); for (i=0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164232/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164232/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_ON 1 // 汎用フラグ - ON #define D_OFF 0 // 汎用フラグ - OFF #define D_VAL_MAX 100005 // 最大値 // 内部変数 static FILE *szpFpI; // 入力 static i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164276/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164276/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int m3, m1; scanf("%d", &X); if(X>=2000){ printf("1"); }else{ m3 = X / 100; X = X - 100 * m3; m1 = X; if ((m3 * 5) >= m1) { printf("1"); } else{ printf("0"); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164319/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#pragma region kyopuro_templates #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164362/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164362/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node_AVL_set = type...
#if 0 cat <<EOF >mistaken-paste #endif // thanks for @rsk0315_h4x #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164412/source.c" target datalayout = "e-m:e-p270: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, ...
//set many funcs template #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.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 min(int a,int b){if(a<b){return a;}return b;} int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164456/source.c" target datalayout = "e-m:e-p270: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.rs = type { i64, i6...
#include<stdio.h> int find(int x) { int i; for(i=1;i<=70;i++) { if(i*i>=x&&x<(i+1)*(i+1)) break; } return i; } int main() { int n,s,ans,i,j; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&s); ans=find(s); printf("%d\n",ans); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1645/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1645/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include<stdio.h> #include<stdlib.h> #include<stdint.h> #include<inttypes.h> typedef struct segment_tree_void { void *array; int32_t size; size_t val_size; void (*func) (void *, const void *, const void *); } segment_tree; static inline void segment_tree_memcpy (void *dst, const void *src, size_t size) { ui...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164542/source.c" target datalayout = "e-m:e-p270: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.segment_tree_void =...
#include<stdio.h> #include<stdlib.h> #include<stdint.h> #include<inttypes.h> typedef int32_t i32; #define MAX(a,b) ((a) > (b) ? (a) : (b)) i32 gcd (i32 a, i32 b) { i32 r = a % b; while (r > 0) { a = b; b = r; r = a % b; } return b; } void run (void) { i32 n; scanf ("%" SCNi32, &n); i32 *a ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164586/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); long long A[N], B[N]; for (int i = 0; i < N; i++) { scanf("%lld%lld", &A[i], &B[i]); } long long sum = 0; for (int i = N-1; i >= 0; i--) { if((A[i]+sum)%B[i] != 0) sum += B[i]-(A[i]+sum)%B[i]; } printf("%lld\n", sum); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164636/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164636/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ unsigned long long int k,n,a[131072],b[131072],r=0,i; scanf("%llu",&n); for(i = 1;i <= n;i++){scanf("%llu%llu",&a[i],&b[i]);} for(i = n;i >= 1;i--){ if((a[i]+r)%b[i] == 0){continue;} k = ((a[i]+r)/b[i])+1; r+=((k*b[i])-(a[i]+r)); } printf("%llu\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164687/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164687/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n,i,count=0,j,check=0; scanf("%d",&n); int array[n+1]; for(i=0;i<n;i++) { //scan input scanf("%d",&array[i]); } for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(array[i]==array[j]) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16473/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 N 4 #define MAX 1000 #define INF -1 typedef struct { int ban[N*N], sp, MD, p[N][N]; }Record; void IDA(Record); int Manhat(Record); int dfs(int, int); int cnt = 0, ans[N][N], size, limit, stack[N], time, path[100]; int dx[4] = {0, -1, 0, 1}; //四方向 int dy[4] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164773/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164773/source.c" target datalayout = "e-m:e-p270: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.Record = type { [16...
#include <stdio.h> int main(){ unsigned char Go[100000]; int i,j,k; int n; int sum; while(1){ scanf("%d\n",&n); if(n==0)break; for(i=0;i<n;i++){ scanf("%d\n",&Go[i]); if(i%2&&Go[i]^Go[i-1]){ for(k=i-1;k>=0;k--){ if(Go[k]==Go[i])break; Go[k]=Go[i]; } } } sum=0; for(i=0;i<n;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164830/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164830/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int cnt_rect, cnt_rhom; cnt_rect = 0; cnt_rhom = 0; while (scanf("%d,%d,%d", &a, &b, &c) != EOF){ if (a * a + b * b == c * c){ cnt_rect++; } if (a == b){ cnt_rhom++; } } printf("%d\n", cnt_rect); printf("%d\n", cnt_rhom); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164874/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164874/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, H = 0; while ( scanf("%d,%d,%d", &a, &b, &c) != EOF ) { if ( c * c == a * a + b * b ) C++; else if ( a == b ) H++; } printf("%d\n%d\n", C, H); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164917/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164917/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 j(int* a,int* b){ return *a-*b; } int main(){ int t,h; int a[3]; t=h=0; while(~scanf("%d,%d,%d",&a[0],&a[1],&a[2])){ // qsort(a,3,sizeof(int),j); if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]){ t++; }else if(a[1]==a[0]){ h++; } } printf("%d\n%d\n",t,h); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,h,q; h=q=0; while(~scanf("%d,%d,%d",&a,&b,&c)) { if(a*a+b*b==c*c) h++; if(a*a-(c/2)*(c/2)==b*b-(c/2)*(c/2)) q++; } printf("%d\n%d\n",h,q); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165046/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { long n,i; long a[5]={0}; int x; scanf("%ld",&n); for(i=0;i<n;++i){ scanf("%d", &x); if(x==1) ++a[0]; else if(x==2) ++a[1]; else if(x==3) ++a[2]; else if(x==4) ++a[3]; else if(x==6) ++a[4]; else{ printf("-1\n"); return 0; } } if(a[0]!=n/3){ pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16509/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,c,t,d; scanf("%d%d%d",&a,&b,&c); if(a>b) t=a; else t=b; if(c%t==0) d=c/t; else d=c/t+1; printf("%d\n",d); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165132/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165132/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h,w,n; scanf("%d",&h); scanf("%d",&w); scanf("%d",&n); int count=0; int sum=0; if(h<w){ for(int i=0;i<h;i++){ count+=w; sum++; if(count>=n){ break; } } }else{ for(int i=0;i<w;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165176/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double hight; double max; double min; scanf("%lf", &hight); max = hight; min = hight; while (scanf("%lf", &hight) != EOF){ if (max < hight){ max = hight; } if (min > hight){ min = hight; } } printf("%.1lf\n", max - min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165219/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165219/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ double height,max,min; max=0; min=1000000; while(scanf("%lf",&height)!=EOF){ max=(max>height)?max:height; min=(min<height)?min:height; } printf("%.1f\n",max-min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165262/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165262/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { float lo, hi, a; scanf("%f",&a); lo = hi = a; while(scanf("%f",&a)!=EOF) { if(a>hi) hi = a; else if(a<lo) lo = a; } printf("%.1f",hi-lo); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165305/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165305/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double max=0,min=0,h; int c=0; while(scanf("%lf",&h) != EOF){ if(c==0) min = h; c++; if(max < h){ max = h; }else if(min > h){ min = h; } } printf("%f\n" ,max-min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165356/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165356/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, char const *argv[]) { double ans; int i = 0, cnt = 0; double height; double max, min; while (scanf("%lf", &height) != EOF) { if (i == 0) { min = height; max = height; } if (height > max) max = height; if (height < min) min = height; i++; } ans = max ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165406/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int h,w; scanf("%d %d", &h, &w); char s[h][w+1]; for (int i = 0; i < h; i++) { scanf("%s", s[i]); } int count[h][w]; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { count[i][j] = 0; } } for (int i = 0; i < h; i++) { for (int j = 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165457/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 struct { int res, line, idx; } Rec; int compare( const void *a, const void *b ) { return ((Rec *)a)->res - ((Rec *)b)->res; } Rec rec[ 200000 ]; char s[ 2 ][ 100001 ]; int main( void ) { int i; int n; scanf( "%d", &n ); for ( i = 0; i < n; i++ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16550/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16550/source.c" target datalayout = "e-m:e-p270: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.Rec = type { i32, i32...
#include <stdio.h> char S[55][55]; int board[55][55]; int main(){ int H,W; scanf("%d %d",&H,&W); int i,j,k; for(i=0;i<H;i++){ for(j=0;j<W;j++){ scanf(" %c",&S[i][j]); board[i][j]=-1; } } int dx[8]={-1,-1,-1,0,0,1,1,1}; int dy[8]={-1,0,1,-1,1,-1,0,1}; for(i=0;i<H;i++){ for(j=0;j<W;j++){ if(S...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165543/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int H,W,i,j,count; char S[51][51]; scanf("%d %d",&H,&W); for(i=0;i<H;i++){ scanf("%s",S[i]); } for(i=0;i<H;i++){ for(j=0;j<W;j++){ count=0; if(S[i][j]=='#'){ printf("#"); } else if(S[i][j]=='.'){ if(S[i][j+1]=='#'){ count++; } if(S[i][j-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100011],b[100011],posa[100011],posb[100011],s1[100011],s2[100011]; void merge(int n){ int i=0,j=0; while(i<n && j<n){ if(a[i]<b[j]){ posa[i]=j; i++; } else{ posb[j]=i; j++; } } while(i<n){ pos...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16563/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16563/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local global [100011...
#include <stdio.h> int main(void) { int a,b,c,d,i,s,g,t=0; scanf("%d%d%d%d",&a,&b,&c,&d); if(a<c) s=a; else s=c; if(b>d) g=b; else g=d; for(i=s;i<=g;i++) if(((a<=i)&&(i<b))&&((c<=i)&&(i<d))) t++; printf("%d\n",t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165680/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165680/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); if(a<c)a=c; if(b>d)b=d; printf("%d",b-a>0?b-a:0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165723/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165723/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); if(c>a)a=c; if(b>d)b=d; if(b-a>0)printf("%d",b-a); else puts("0"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165774/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c,d,s; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); if((b<c)||(a>d)) s=0; else { if(a<c) if(b>d) s=d-c; else s=b-c; else if(b<d) s=b-a; else s=d-a; } printf("%d",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165817/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165817/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main () { int A,B,C,D,m,n,s; while(scanf("%d %d %d %d",&A,&B,&C,&D)!=EOF) { if(A>C) m=A; else m=C; if(B>D) n=D; else n=B; s=n-m; if(s<0) printf("0\n"); else printf("%d\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165860/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c,d,sec; scanf("%d %d %d %d", &a, &b,&c,&d); if(b<=c||d<=a){ sec = 0; } else { sec = (b<d?b:d)-(a<c?c:a); } printf("%d\n", sec); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165903/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165903/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int A, B, C, D, min, max, i, j; scanf("%d %d %d %d", &A, &B, &C, &D); if (A < C) min = C; else min = A; if (B < D) max = B; else max = D; if (B < C || D < A) { printf("0\n"); return 0; } printf("%d\n", max - min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165947/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165947/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n; int debt; int i; scanf("%d", &n); debt = 100000; for (i = 0; i < n; i++) { debt *= 1.05; if (debt % 1000 != 0) { debt /= 1000; debt += 1; debt *= 1000; } } printf("%d\n", debt); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166003/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166003/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,debt,i,amari; scanf("%d",&n); debt = 100000; for(i=0;i<n;i++){ debt *=1.05; amari = debt%1000; if(amari != 0){ debt = debt - amari + 1000; } } printf("%d\n",debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166047/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166047/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 DEBT 100000 int main(void) { int n, d = DEBT; for(scanf("%d", &n); n--;) { d = d * 105 / 100; d % 1000 && (d += 1000 - d % 1000); } printf("%d\n", d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166098/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166098/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> // printf(), scanf() int main(int argc, char** argv) { int t; int n, i; t = 100000; scanf("%d", &n); for (i = 0; i < n; ++i) { t = (t * 105) / 100; t = (t + 999) / 1000; t *= 1000; } printf("%d\n", t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166148/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166148/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,loan = 100000; while (1){ scanf("%d", &n); if (0 <= n&&n <= 100) break; } for (i = 0; i < n; i++){ loan *= 1.05; if (loan % 1000 != 0){ loan -= loan % 1000; loan += 1000; } } printf("%d\n", loan); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166191/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166191/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #define U1 unsigned char #define S1 char #define S4 int #define S8 long #define TRUE (1) #define FALSE (0) #define RATE_OF_INTEREST (105) /* 借金の利率(%) */ #define PERCENT (100) /* 割合をパーセントに変換する定数 */ #define ROUN...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166234/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166234/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 , i , debt = 100000; scanf("%d" , &n); for(i=1;i<=n;i++){ debt *= 1.05; if(debt%1000>0){ debt = debt - (debt%1000) + 1000; } } printf("%d\n" , debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166285/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166285/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main (int argc, char* argv[]) { int n, i; long int capital=100000; scanf("%d", &n); for (i=0; i<n; i++) { capital *= 1.05; if (0 < capital % 1000) { capital = capital / 1000 + 1; capital *= 1000; } } printf("%ld\n", capital); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166335/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ganpon = 100000;/* 元本 */ int n; double riritu = 0.05; /* 利率 */ int i; scanf("%d", &n); for(i = 0; i < n; i++) { if((int)(ganpon * (1.0 + riritu)) % 1000 == 0) ganpon = ganpon * (1.0 + riritu); else ganpon = ((int)(ganpon * (1.0 + riritu)) / 1000) * 1000 + 1000; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166393/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 start=100; double r=1.05; double result; int result1; int n,i; result1 = start; scanf("%d",&n); for(i=0;i<n;i++){ result=result1*r; result1=result; if(!(result-result1==0)){ result1++; } } printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166450/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i = 100000; long j,n; scanf("%ld",&n); for(j = n;j > 0;j--){ i = i + i * 0.05; if(i % 1000 == 0){ } else{ i = i / 1000; i = i * 1000 + 1000; } } printf("%ld\n",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166494/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166494/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...