Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void){ int k,n; scanf("%d%d",&k,&n); int a[n]; for(int i=0;i<n;i++){ scanf("%d",&a[i]); } int d[n],max=0; for(int i=0;i<n-1;i++){ d[i]=a[i+1]-a[i]; if(d[i]>max)max=d[i]; } d[n-1]=a[0]+k-a[n-1]; if(d[n-1]>max)max=d[n-1]; printf("%d",k-max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,n; int a[1000000]; scanf("%d %d",&k,&n); for(i = 0;i < n;i++) { scanf("%d",&a[i]); } a[n] = a[0] + k; i = 0; int max = a[1] - a[0]; for(i = 0;i < n;i++) { if(max < a[i+1]-a[i]) { max = a[i+1] - a[i]; } } printf("%d\n",k-max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201391/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> void main(void) { int K,N,max,i; scanf("%d %d",&K,&N); int A[N+1]; for(i=0;i<N;i++){ scanf("%d",&A[i]); } A[N]=A[0]+K; max=A[1]-A[0]; for(i=0;i<N-1;i++){ if(max<(A[i+2]-A[i+1])) max=A[i+2]-A[i+1]; } printf("%d",K-max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201441/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201441/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <assert.h> int main(void){ int a,b; int score; scanf("%d",&a); scanf("%d",&b); int c[b]; for(int i = 0;i<b;i++){ scanf("%d",&c[i]); } int d[b]; for(int j = 0;j<b-1;j++){ d[j] =c[j+1]-c[j]; } int max = d[0]; for (int k = 1; k < b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201485/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201485/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int k,n; scanf("%d %d",&k,&n); int a[n+1]; for(int i=0;i<n;i++){ scanf("%d",&a[i]); } int tmp=a[0]; for(int i=0;i<n;i++){ a[i]-=tmp; } int d=k-a[n-1]; for(int i=0;i<n-1;i++){ if(a[i+1]-a[i]>d){ d=a[i+1]-a[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201528/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201528/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <assert.h> #include <stdio.h> int main() { unsigned int k, n, i, first, last, a, max = 0; assert(scanf("%d %d", &k, &n) == 2); assert(scanf("%d", &first) == 1); last = first; for (i = 1; i < n; i++) { assert(scanf("%d", &a) == 1); a = a - last; last += a; if (max < a) { max = a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201571/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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%3==0)||(b%3==0)||((a+b)%3==0))printf("Possible"); else printf("Impossible"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201614/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,i; scanf("%d%d",&a,&m); if(a%3==0||m%3==0||(a+m)%3==0){ printf("Possible\n"); } else{ printf("Impossible\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201658/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int a, b; int main(){ scanf("%d%d", &a, &b); if(a%3==0 || b%3==0 || (a+b)%3==0){ printf("Possible\n"); }else{ printf("Impossible\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201708/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, sum; scanf("%d", &A); scanf("%d", &B); if((A%3==0) || (B%3==0) || (A+B)%3==0){ printf("Possible"); }else{ printf("Impossible"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201759/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201759/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b; scanf("%d %d", &a, &b); if ((a % 3 == 0) || (b % 3 == 0) || ((a + b) % 3 == 0)) { printf("Possible\n"); } else printf("Impossible\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201809/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201809/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i, j, k; scanf("%d", &a); scanf("%d", &b); i = a % 3; j = b % 3; k = (a+b) % 3; if(i == 0){ printf("Possible"); }else if(j == 0){ printf("Possible"); }else if(k == 0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,mix; scanf("%d %d",&a,&b); mix = a + b; if( mix%3 == 0 || a%3==0 || b%3==0){ printf("Possible"); }else{ printf("Impossible"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201896/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201896/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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%3==0||b%3==0||(a+b)%3==0) { printf("Possible\n"); } else { printf("Impossible\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201939/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201939/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, E, F, S, t = 0; scanf("%d %d %d %d %d", &A, &B, &C, &D, &E); if ( A < 0 ) t = - A * C + B * E; if ( A <= 0 ) t += D; else t = ( B - A ) * E; printf("%d\n", t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_201982/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_201982/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int r; while(scanf("%d",&n)!=EOF){ r=n%39; if(r==0)r=39; printf("3C%02d\n",r); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202031/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202031/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// Aizu Vol-1 0148: Candy and Class Flag // 2017.8.2 #include <stdio.h> #include <stdlib.h> char *gets(char *); char buf[50]; int main() { while (gets(buf) != NULL) { printf("3C%02d\n", (atoi(buf)-1) % 39 + 1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202075/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202075/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @buf = dso_local global [50...
#include <stdio.h> int main(void){ int n; int i; while(scanf("%d", &n) != EOF){ i = 0; while(n > 0){ n--; i++; if(i > 39){ i = 1; } } if(i<10){ printf("3C0%d\n", i); } else{ printf("3C%d\n", i); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202147/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202147/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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_202226/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202226/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hwll = type { i64, ...
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) #define MAX(X, Y) (((X) > (Y)) ? (X) : (Y)) #define llu unsigned long long llu L, R; int main() { scanf("%llu %llu", &L, &R); printf("YES\n"); for(llu i = L; i <R; i+=2) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20227/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20227/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 an[6]; for(int i=0; i<5; i++){ scanf("%d", &an[i]); } int k; scanf("%d", &k); for(int i=0; i<5; i++){ for(int j=i; j<5; j++){ if(i==j) continue; if(an[j] - an[i] > k){ printf(":(\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <stdbool.h> #define LL long long #define INF 1<<31-1 #define LLINF 1<<63-1 #define MIN(x,y) ((x)<(y)?(x):(y)) #define MAX(x,y) ((x)<(y)?(y):(x)) #define MOD 1000000007 void swap(int* x,int* y){ int tmp=*x;*x=*y;*y=tmp; } int main()...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202356/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202356/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j; int w; scanf("%d %d",&n,&k); int a[n+1]; for(i=1,j=k+1; i<=k+1; j--,i++) a[i]=j; for(i=k+2,j=1; i<=n; i++,j++) a[i]=j+k+1; for(i=1; i<=n; i++) printf("%d ",a[i]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2024/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2024/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main(void) { int a,b,c,d,e,k; scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&k); if (e-a<=k) printf("Yay!\n",d); else printf(":(\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202442/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202442/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[5], i, j, k; for (i = 0; i < 5; i++) { scanf("%d", &a[i]); } scanf("%d", &k); for (i = 0; i < 4; i++) { for (j = i + 1; j < 5; j++) { if (a[j] - a[i] > k) { printf(":(\n"); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202493/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,e,k; int ab,ac,ad,ae,bc,bd,be,cd,ce,de; scanf("%d\n",&a); scanf("%d\n",&b); scanf("%d\n",&c); scanf("%d\n",&d); scanf("%d\n",&e); scanf("%d\n",&k); ab=b-a; ac=c-a; ad=d-a; ae=e-a; bc=c-b; bd=d-b; be=e-b; cd=d-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202543/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10],k; scanf("%d",&a[0]); scanf("%d",&a[1]); scanf("%d",&a[2]); scanf("%d",&a[3]); scanf("%d",&a[4]); scanf("%d",&k); for(int i=0;i<5;i++){ for(int j=1;j<5;j++){ if(a[j]-a[i] > k){ printf(":(\n"); return 0; } } } printf("Yay!\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,e,k; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); scanf("%d",&e); scanf("%d",&k); if(b-a>k){ printf(":("); return 0; } if(c-a>k){ printf(":("); return 0; } if(d-a>k){ printf(":("); return 0;} if(e-a>k){ printf(":("); return 0;} printf("Yay!"); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202637/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 COLOR_NUM 6 /* パネル配置 */ typedef struct panel{ int h; int w; int p[8][8]; } Panel; /* 変更履歴 */ typedef struct change_log{ int x[8*8]; int y[8*8]; int n; int c; } Log; Panel p; int c; Log l[6]; int step; /* パネルを表示する (デバッグ用) */ void show(){ int i, j; for (i = 0; i < p.h; i++){ for ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202680/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202680/source.c" target datalayout = "e-m:e-p270: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.panel = type { i32,...
#include<stdio.h> int main() { long long int t; scanf("%lld",&t); while(t--) { long long int n,a[1024]; scanf("%lld",&n); for(long int i=0;i<n;i++) { scanf("%lld",&a[i]); } long int x=1,y,q=1; while(x<1025) { long in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20276/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20276/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdlib.h> int main() { int t; scanf("%d",&t); for(int test=0;test<t;test++) { long long int a,b,tpow=0; int flag=0; scanf("%lld %lld",&a,&b); if(a>b) { long long int div=a/b; long long int modu=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20281/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> void print_day (int d){ int i = d % 7; if (i==0) printf ("Monday\n"); else if (i==1) printf ("Tuesday\n"); else if (i==2) printf ("Wednesday\n"); else if (i==3) printf ("Thursday\n"); else if (i==4) printf ("Friday\n"); else if (i==5) printf ("Saturday\n"); else printf ("Sunday\n"); } int m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.month = priva...
#include<stdio.h> int main(){ int n1,n2,x; while(1){ x=0; scanf("%d %d",&n1,&n2); if(n1==0 && n2==0){ break; } if(n1==1 || n1==3 || n1==5 || n1==7 || n1==8 || n1==10 || n1==12){ x=x+(31*(n1-1))+n2; if(n1==3 || n1==5 || n1==7 ){ x=x-((n1-1)*0.5+1); } if(n1==8 || n1==10 || n1==12){ x=x-(n1*0.5); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 mon,dat,a[13],i,j,cnt; a[1]=a[3]=a[5]=a[7]=a[8]=a[10]=a[12]=31; a[4]=a[6]=a[9]=a[11]=30; a[2]=29; while(scanf("%d%d",&mon,&dat),mon){ cnt=3; for(i=1;i<=12;i++){ for(j=1;j<=a[i];j++){ cnt++; if(i==mon &&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_202983/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_202983/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> long GCD(long a, long b){ long dividend, divisor; if (a >= b) { dividend = a; divisor = b; } else { dividend = b; divisor = a; } long remainder; while (1) { if (divisor == 1) { return 1; } remainder = dividend % divisor; if (remaind...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203032/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203032/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b; scanf("%lld %lld", &a, &b); if(a < b){ long long int sw = a; a = b; b = sw; } long long int r = a % b; while(r != 0){ a = b; b = r; r = a % b; } long long int rb = sqrt(b); int ans = 1; if(b % 2 == 0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203076/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* AOJ 1285 Grey Area */ #include<stdio.h> #include<stdlib.h> #define N_MAX 100 #define BAR_MAX 11 struct fraction { int numerator, denominator; }; struct fraction mul(struct fraction x, struct fraction y) { struct fraction z; z.numerator = x.numerator * y.numerator; z.denominator = x.denominato...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203119/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203119/source.c" target datalayout = "e-m:e-p270: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.fraction = type { i...
#include <stdio.h> int main(void){ int h1, h2, k1, k2, ansh, ansk; int a, b, c, d; scanf("%d%d", &h1, &h2); scanf("%d%d", &k1, &k2); scanf("%d%d%d%d", &a, &b, &c, &d); ansh = h1*a + h2*b + (h1/10)*c + (h2/20)*d; ansk = k1*a + k2*b + (k1/10)*c + (k2/20)*d; if(ansh > ansk){ printf("hiroshi\n"); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203162/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203162/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203205/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203205/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.sd = type { i32, i3...
#include<stdio.h> #define SQ(x) ((x)*(x)) #define IN(x,y) ((0<=x&&x<=5000)&&(0<=y&&y<=5000)) typedef struct{ int x; int y; }point; char map[5001][5001]; point ps[3000]; int pi; int st; int main(){ int i,j,d,dx,dy,nx,ny; int max; do{ scanf("%d",&pi); if(pi==0) break; st++; max=0; for(i=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203263/source.c" target datalayout = "e-m:e-p270: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.point = type { i32,...
#include <stdio.h> int main() { int N; int a, b, c; int i, temp; scanf("%d", &N); for(i = 0; i < N; i++) { scanf("%d %d %d", &a, &b, &c); if(a < b) { temp = b; b = a; a = temp; } if(b < c) { temp = c; c = b; b = temp; } if(a < b) { temp = b; b = a; a = temp; } if((a*a) =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203313/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203313/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void compare(int *a, int *b) { int temp; if(*a > *b) { temp = *a; *a = *b; *b = temp; } } int main(){ int a, b, c, n, i; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d %d %d", &a, &b, &c); compare(&a, &b); compare(&b, &c); if(a*a + b*b == c*c) { puts("YES"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203357/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203357/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,t; scanf("%d",&n); while(n--){ scanf("%d %d %d",&a,&b,&c); if(a<b){t=a;a=b;b=t;} if(a<c){t=a;a=c;c=t;} if(a*a==b*b+c*c)printf("YES\n"); else printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203414/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ int c, N, i, j, k; int x[3]; char tmp[5]; i = 0; while(( c = getchar()) != '\n'){ tmp[i++] = c; } tmp[i] = '\0'; N = atoi(tmp); for(k = 0; k < N; k++){ i = 0; for(j = 0; j < 3; j++){ while(( c = getchar()) != ' ' && c != '\n' &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203458/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203458/source.c" target datalayout = "e-m:e-p270: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 a, b, c, temp; int n, i; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d %d", &a, &b, &c); if (a > c) { temp = c; c = a; a = temp; } if (b > c) { temp = c; c = b; b = temp; } if (a * a + b * b == c * c) { printf("YES\n"); } else { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203500/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(void){ int N,i,j,box,count=0; double tri[3]={0}; scanf("%d",&N); while(count<N){ scanf("%lf %lf %lf",&tri[0],&tri[1],&tri[2]); for(i=0;i<2;i++){ for(j=i+1;j<3;j++){ if(tri[i]>tri[j]){ box=tri[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203544/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203544/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> void swap(int *a, int *b); int main(void){ int n, a, b, c; int i; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%d%d%d", &a, &b, &c); if(a < b){ swap(&a, &b); } if(a < c){ swap(&a, &c); } if(a*a == b*b + c*c){ printf("YES\n"); }else{ pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203588/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203588/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main(void){ int hen1, hen2, hen3; int i, j, n; int s, m, l; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%d %d %d", &hen1, &hen2, &hen3); if((hen1 < hen2) && (hen1 < hen3)){ s = hen1; if(hen2 < hen3){ m = hen2; l = hen3; } else{ m = hen3; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main() { int n,i; int a[1000],b[1000],c[1000]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d%d",&a[i],&b[i],&c[i]); } for(i=0;i<n;i++){ if((c[i]*c[i])==(a[i]*a[i]+b[i]*b[i])||(a[i]*a[i])==(b[i]*b[i]+c[i]*c[i])||(b[i]*b[i])==(a[i]*a[i]+c[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203674/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203674/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N; int x, y, z; int min(int a, int b) { if(a <= b) { return a; } else { return b; } } int max(int a, int b) { if(a >= b) { return a; } else { return b; } } int main() { scanf("%d", &N); int a = 0, b = 0, c = 0; for(int i = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203731/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main() { int n, i, j, k, buff[3]; scanf("%d", &n); for (i = 1; i <= n; i++) { scanf("%d %d %d", buff, buff + 1, buff + 2); if ( pow(buff[0], 2) == pow(buff[1], 2) + pow(buff[2], 2) || pow(buff[1], 2) == pow(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203797/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203797/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define REP(i,a,b) for(i=a;i<b;i++) #define rep(i,n) REP(i,0,n) #define sqr(x) x*x int main(){ int n, f; int s1, s2, s3; scanf("%d",&n); while(n--){ scanf("%d %d %d",&s1,&s2,&s3); f = 0; if(sqr(s1) == sqr(s2) + sqr(s3)) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203847/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203847/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,result[1000],a[1000],b[1000],c[1000]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d",&a[i],&b[i],&c[i]); result[i]=0; } for(i=0;i<n;i++){ if(a[i]*a[i]==b[i]*b[i]+c[i]*c[i])result[i]=1; if(b[i]*b[i]==a[i]*a[i]+c[i]*c[i])result[i]=1; if(c[i]*c[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203904/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203904/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,tmp,n; scanf("%lf",&n); while(scanf("%lf%lf%lf",&a,&b,&c)!=EOF){ if(a>b){ tmp=a; a=b; b=tmp; } if(b>c){ tmp=b; b=c; c=tmp; } if(a*a+b*b==c*c){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_203948/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_203948/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, in1, in2, in3, a, b, c; scanf("%d", &N); for(i = 0; i < N; ++i) { scanf("%d %d %d", &in1, &in2, &in3); if(in1 >= in2 && in1 >= in3) { a = in2; b = in3; c = in1; } else if(in2 >= in1 && in2 >= in3) { a = in1; b = in3; c ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ int a,b,c,i,num; scanf("%d",&num); for(i = 0;i < num;i++){ scanf("%d %d %d",&a,&b,&c); a = a * a; b = b * b; c = c * c; if(a == (b + c) || c == (a+b) || b == (c + a)){ printf("YES\n"); }else{ printf("NO\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b, c; int i; scanf("%d", &n); for(i = 0; i < n; i++){ scanf("%d %d %d", &a, &b, &c); if(a > b && a > c){ if(a * a == b * b + c * c){ printf("YES\n"); }else{ printf("NO\n"); } }else if(b > a && b > c){ if(b * b == a * a + c * c){ p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204099/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204099/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,i; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d",&a,&b,&c); if(a*a==b*b+c*c) printf("YES\n"); else if(b*b==c*c+a*a) printf("YES\n"); else if(c*c==a*a+b*b) printf("YES\n"); else printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204141/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c; scanf("%d",&N); for (int i=0; i<N; i++) { scanf("%d %d %d",&a,&b,&c); int max=a; if (max<b) { max=b; } if (c>max) { max=c; } if (max*max ==(a*a) + (b*b) + (c*c) - (max * max)) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204192/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i, j, k; char s[202][202]; for (i = 0; i < n; i++) scanf("%s", s[i]); int ans = -1, v; int p; for (k = 0; k < n; k++) { int g[202]; for (i = 0; i < n; i++) g[i] = -1; g[k] = 1; int q[10006], l = 0, r = 0; r++; q[0] = k; int m; whi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204242/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204242/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> void swap (long long int *x,long long int *y) { long long int temp = *x; *x = *y; *y = temp; } int partition (long long int array[],long long int left,long long int right) { long long int i, j, pivot; i = left; j = right + 1; pivot = left; do { do { i++; } while (array[i] < array[p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204286/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204286/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() #include <stdlib.h> // qsort() #include <math.h> // fabs() #include <stdbool.h> #define MAX_N 1000 typedef struct rbmi_tbl { int p; double rbmi; } rbmi_t; int cmp_func(const void *l_, const void *r_) { const rbmi_t *l = (const rbmi_t*) l_; const ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204329/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204329/source.c" target datalayout = "e-m:e-p270: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.rbmi_tbl = type { i...
#include <stdio.h> #include <string.h> #define N 500000 #define MD 998244353 int main() { int t; scanf("%d", &t); while (t--) { static int dp[N + 1], dq[N + 1]; int n, i, a, ans; scanf("%d", &n); memset(dp, 0, (n + 1) * sizeof *dp), memset(dq, 0, (n + 1) * sizeof *dq); for (i = 0; i < n; i++) { scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20438/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20438/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ char S[100005]; int N,i=0,num=0; int Y[105]; scanf("%d",&N); scanf("%s",S); while(i<N){ if(S[i]=='X'&&S[i+1]=='O') ++num,i+=2; else if(S[i]=='O'&&S[i+1]=='X') ++num,i+=2; else i++;} printf("%d\n",num); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex4_1 bonbonc */ #include<stdio.h> int main(void){ int tree, range; int assigned;/*一人が割り当てられる木の本数の最大値*/ scanf("%d %d",&tree,&range); assigned = 2*range+1; /*自分のいる位置と左右にrange本*/ if (tree%assigned==0){/*木の本数がassignedで割り切れるとき*/ printf("%d\n",tree/assigned);/*木の本数をassignedで割った商を出力*/ }else{ printf("%d\n",t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204473/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex4_1 shu_t */ #include<stdio.h> #include<math.h> int main(void){ int tree_num, D; int ans; //input N and D scanf("%d %d",&tree_num,&D); //answer: round up to tree_num divided by 2*D+1 ans = ceil((double) tree_num/(2*D+1)); //output the answer printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204516/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204516/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex4_1 person_A */ #include<stdio.h> #include<math.h> int main(void){ double treeNum,staffNum; //treeNumとstaffNumの値の取得 scanf("%lf%lf",&treeNum,&staffNum); //最低限必要な監視員の数の出力 //一人が監視できる木の最大本数で割って、余った場合は一人追加 printf("%d\n",(int)ceil(treeNum/(2*staffNum+1))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204567/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204567/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(a,b) ((a>b)?(a):(b)) int a[200005]; int c[200005]; int main() { int t; scanf("%d", &t); while( t-- ) { int n; scanf("%d", &n); int m = 0; for( int i=0; i<n; ++i ) { scanf("%d", a+i); m = max(m,a[i]); } for( int i=0; i<n; ++i ) c[a[i]] += 1; int l2 = 1; for( ;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20461/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,D; scanf("%d %d",&N,&D); printf("%d\n",(N+2*D)/(2*D+1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204697/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204697/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int N,D,a,i; scanf("%d%d",&N,&D); a=2*D+1; for(i=0;a*i<N;i++); printf("%d",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int n, d; //n= num of tree, d = range of check //input scanf("%d %d", &n, &d); //calc int watcherNum = n /(d*2+1); if( n % (d*2+1) !=0){ watcherNum++; } //output printf("%d\n", watcherNum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); for(int i=0;i<t;i++) { int n,x; scanf("%d %d",&n,&x); int a[200]; for(int j=0;j<200;j++) { a[j]=0; } int ai; for(int j=0;j<n;j++) { scanf("%d",&ai); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20487/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20487/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main(void) { int n, d, k; scanf("%d %d", &n, &d); k = d * 2 + 1; if (n % k == 0) { printf("%d\n", n / k);} else { printf("%d\n", n / k + 1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204912/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204912/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 coin,total; scanf("%d\n%d",&total,&coin); int x = total/500; int y = x * 500; if(y == total){ printf("Yes\n"); } else{ int z = total-y; if(coin >= z){ printf("Yes\n"); } else{ printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_204956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_204956/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdio.h> int str[30005]; void quicksort(int left,int right) { int i,j,temp,t; if(left>right) return; temp=str[left]; i=left,j=right; while(i!=j) { while(str[j]>=temp&&i<j) j--; while(str[i]<=temp&&i<j) i++; if(i<j) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @str = dso_local local_unnamed_ad...
#include <stdio.h> int main(void) { int n, a; int _ign = scanf("%d %d", &n, &a); int tmp; if (!(tmp = (n % 500))) printf("Yes"); else if (tmp <= a) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205085/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d%d",&n,&a); if(n%500 <= a){printf("Yes");} else{printf("No");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205135/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d",&N,&A); if(N % 500 <= A) printf("Yes\n"); else printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int N, A; scanf("%d %d", &N, &A); while(N >= 500) N -= 500; puts(N <= A ? "Yes" : "No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &N); scanf("%d", &A); if (A - (N % 500) >= 0){ printf("Yes\n"); } else { printf("No\n"); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205294/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205294/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rep(x)for(i=0;i<x;i++) int main(){ int n,i,l=0,r=0;char s[210]; scanf("%d\n%s",&n,s); rep(n){ if(s[i]=='(')l++; else if(s[i]==')')l--; if(l<0){r++;l++;} } rep(2e9)n*=n; rep(r)printf("("); printf("%s",s); rep(l)printf(")"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205337/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205337/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> void insert(char*, int, char); //array, position, insert chara. int main(void){ int N; scanf("%d", &N); char s[201]; scanf("%s", s); //FR int o = 0, c = 0, j = 0; for(int i=0; i<N; i++){ switch (s[j]){ case '(': o++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205380/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b,c; scanf("%d %d %d", &a, &b, &c); if (a == b && b == c){ printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205423/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { double b,factor,max,a,A[105],sum=0; int i,n; scanf("%d%lf",&n,&b); max=0; for(i=0;i<n;i++) { scanf("%lf",&a); if(a>max) max=a; A[i]=a; } for(i=0;i<n;i++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20551/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20551/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 year; char month[3] = {'\0'}; char day[3] = {'\0'}; scanf("%3d7/%2s/%2s%*[^\n]%*c", &year, month, day); getchar(); printf("%3d8/%2s/%2s\n", year, month, day); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205762/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char s[11]; int x=2018; scanf("%s",s); printf("%d%c%c%c%c%c%c\n",x,s[4],s[5],s[6],s[7],s[8],s[9]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 q[101] = {}, c, a, n, x, i, j; scanf("%d", &x); for(i = 0; i < x; i++){ scanf("%d %d %d", &c, &a, &n); while(c > 0 && a > 0 && n > 0){ c--; a--; n--; q[i]++; } while(c >= 2 && a >= 1){ c -= 2; a--; q[i]++; } while(c >= 3){ c -= 3; q[i]++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_205971/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_205971/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int prime(int i) { int k; if(i==1) return 0; if(i==2||i==3) return 1; for(k=2;k<=sqrt(i);k++) if(i%k==0) return 0; return 1; } int main() { int a,d,n; int i,count; while(1){ scanf("%d %d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sosuu(int so){ int i=0; if(so==1) return 0; for(i=2;i*i<=so;i++){ if(so%i==0) return 0; } return 1; } int main(void){ int i=0; int j=0; int so[10000]; int a=0; int d=0; int v=0; int c=0; int s=0; int count=0; int n=0; int ans[1000]; while(1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206121/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N; char s[100001]; int loop = 0; int point = 0; scanf("%s", s); N = strlen(s); do { if (s[loop++] == 'p')point--; if (s[loop++] == 'g')point++; } while (loop < N); printf("%d\n", point); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206165/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 path[100][60]; int sum[100][60]; int i, j; char temp; int num, flag; for (i = 0; i < 100; i++){ for (j = 0; j < 60; j++){ path[i][j] = 0; sum[i][j] = 0; } } i = j = num = flag = 0; while (scanf("%d%c", &path[i][j], &temp) != EOF){ nevermind:; if (!flag){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206215/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206215/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ double a; scanf("%lf",&a); a/=3; printf("%lf",a*a*a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206259/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206259/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l; scanf("%d",&l); printf("%.12f\n",(double)l*l*l/27); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206301/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> //sourav int main(){ int L; scanf("%d",&L); printf("%.12f\n",(double)L*L*L/27); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206345/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double l; scanf("%lf", &l); printf("%lf\n", (l/3)*(l/3)*(l/3)); return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l; double n; scanf("%d",&l); n=l/3.0; printf("%lf",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l; scanf("%d",&l); double s=l/3.0; printf("%lf",s*s*s); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l; float s,vol; scanf("%d",&l); s=l/3.0 ; // printf("%lf",s); //vol= pow(,3); vol= s*s*s; printf("%lf",vol); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 double l; scanf("%Lf",&l); printf("%Lf",l*l*l/27); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_206576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_206576/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...