Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main() { long long int n; scanf("%I64d ",&n); if(n%2==0) { printf("Mahmoud"); } else { printf("Ehab"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25774/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,k,i; scanf("%d%d%d",&a,&b,&k); for(i = 0;i < k;i++){ if(i % 2 == 0){ if(a % 2 == 0) a = a; if(a % 2 != 0) a -= 1; b += a / 2; a -= a / 2; } if(i % 2 == 1){ if(b % 2 == 0) b = b; if(b % 2 != 0) b -= 1; a += b / 2; b -= b / 2; } } printf("%d %d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 long A,B,K; scanf("%lld%lld%lld",&A,&B,&K); for(long long i=0;i<K;i++){ if(i%2==0){ if(A%2==1)A--; B+=A/2; A/=2; }else{ if(B%2==1)B--; A+=B/2; B/=2; } } printf("%lld %lld\n",A,B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int N, M, K; while ( scanf("%d %d %d", &N, &M, &K) == 3) { int i; int min = 0x7FFFFFFF; for ( i = 0; i < N; i++) { int cur; scanf("%d", &cur); if ( !( i & 1)) { min = cur < min ? cur : min; } } long long ans = 0; if ( N & 1) { long long time = (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25787/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25787/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i, j, z, K, S; int count = 0; scanf("%d %d", &K, &S); for (i=0; i<=K; i++) { for (j=0; j<=K; j++) { z = S - i - j; if (z >= 0 && z <= K) count++; } } printf("%d", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257912/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257912/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, S; scanf("%d %d", &K, &S); int ANS = 0; for(int x = 0; x <= K; x++) { for(int y = 0; y <= K; y++) { int z = S - x - y; if(0 <= z && z <= K) ANS++; } } printf("%d\n", ANS); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257956/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <math.h> int main(void){ int k,s,x,y,cnt=0; scanf("%d%d",&k,&s); for(x=0;x<=k;x++){ for(y=0;y<=k;y++){ int z=s-x-y; if(z>=0&&z<=k) cnt++; } } printf("%d",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258005/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k,s,i,j,sum=0; scanf("%d %d",&k,&s); for(i=0;i<=k;i++) { for(j=0;j<=k;j++) { if((i+j)<=s&&(i+j)>=(s-k)) { sum++; } } } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258049/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258049/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k=0,s=0; int ans=0; scanf("%d %d",&k,&s); for(int x=0;x<=k;x++){ for(int y=0;y<=k;y++){ if(s - x - y<=k && s - x - y>=0)ans++; } } printf("%d\n",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, S, i, j, k, count = 0; scanf("%d%d", &K, &S); for (i = 0; i <= K; i++) { for (j = i; j <= K; j++) { for (k = j; k <= K; k++) { if (i + j + k == S) { if (i == j && j == k) { count++; } else if (i == j || j == k || k == i) { count += 3; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258142/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 pop(); int push(int); int d[11],top,n,i; int main(){ while(scanf("%d",&n)!=EOF){ if(n==0){ pop(); printf("%d\n",d[top+1]); } else{ d[i]=push(n); } } return 0; } int push(int x){ top++; d[top]=x; return d[top]; } int pop(){ top--; ret...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258193/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 data[100], out[100]; int i = 0, k = 0; int top(){ return data[i - 1]; } void pop(){ i--; } int main(){ int a; while(scanf("%d", &data[i]) != EOF){ if(data[i] != 0){ i++; }else{ out[k] = top() ; k++; pop(); } } for(a = 0; a < k; a++){ printf("%d\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include <stdio.h> int stack[1000],point=0; int fstack(int com,int num){ int data; if(com==0){ data=stack[point]; stack[point]=num; point--; return data; } if(com==1){ point++; stack[point]=num; return 0; }else{ return -1; } }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258287/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @point = dso_local local_un...
#include <stdio.h> int main(){ int syako[11],n,i; i=0; while(0<=scanf("%d",&n)){ if(n==0){ printf("%d\n",syako[i]); i--; }else{ i++; syako[i]=n; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258337/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258337/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num; int i; int cars[10]; for (i = 0; i < 10; i++){ cars[i] = 0; } while (scanf("%d", &num) == 1){ if (num != 0){ for (i = 0; i < 10; i++){ if (cars[i] == 0){ cars[i] = num; break; } } } else { for (i = 9; i >= 0; i--){ if (cars[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258416/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s1[11],s2[11]; int main() { int a=0,b=0,u=0,f=0,i,i1,j;//len=strlen(s1); long long int max=1; scanf("%s %s",s1,s2); i=0; while(s1[i]=='+' || s1[i]=='-') { if(s1[i]=='+') a++; else a--; i++; } i=0; while(s2[i]=='+' ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25846/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 stack[1000]; int car, p = 0; while(scanf("%d\n", &car) == 1) { if(car == 0) { if(p > 0) { printf("%d\n", stack[p-1]); p--; } } else { stack[p] = car; p++; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258517/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,i,j; int main() { scanf("%d %d",&n,&m); if(n&1)j=n/2+1;else j=n/2; for(i=j;i<=n;i++) { if(i%m==0){printf("%d",i);return 0;} } printf("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25859/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,m,step,i,f; scanf("%d %d",&n,&m); if(n%2==1) step=n/2+1; else step=n/2; i=0; f=0; for(i=step;i<=n;i++) { if(i%m==0) { f=1; break; } } if(f==1) printf("%d\n",i); else printf("-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25864/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25864/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 k; scanf("%d",&k); while (k--) { printf("ACL"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258683/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { const char *SEP = " "; int i, k; char input_str[12 * 200000]; char *num_str; fgets(input_str, sizeof(input_str), stdin); num_str = strtok(input_str, SEP); k = atoi(num_str); for ( i = 0; i < k; i++ ) { printf("ACL"); } printf("\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,i,j; scanf("%d%d",&n,&m); i = n/2; j = n%2; while((i+j)%m != 0 && i >0) { i--; j=j+2; } if((i+j)%m != 0) { printf("-1\n"); } else { printf("%d",i+j); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25877/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25877/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 solve(void); int main(void){ int n; scanf("%d",&n); while(n--) solve(); return 0; } int solve(void){ /*ここに答えを書く*/ int a,b,tmp; scanf("%d:%d",&a,&b); tmp=a*60+b-b*12; if(tmp<0){ tmp*=-1; } if(tmp>360){ tmp=720-tmp; } if(tmp<60){ puts("alert"); }else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258841/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> struct _log { int i; long t; }; typedef struct _log log; int main() { while(1) { int n, j, k; int count = 0; long t; scanf("%d",&n); if (n == 0) break; for (j = 0; j < n; j++) { log l[4000]; int i, p, q; int idx = -1; scanf("%d %d %d",&i, &p, &q); t = (long)p * (long)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258885/source.c" target datalayout = "e-m:e-p270: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._log = type { i32, ...
// AOJ Volume 1 Problem 0100 #include <stdio.h> #include <string.h> typedef struct { int no; long long sales; } DATA; int main(void) { DATA sale[4000]; int i, j; int n; int no, price, quantity; int data_no; int flag; while (1){ scanf("%d", &n); if (n == 0){ break; } memset(sale, 0, sizeof(sa...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258935/source.c" target datalayout = "e-m:e-p270: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.DATA = type { i32, ...
#include <stdio.h> #include <string.h> #define REP(i,n) for(i=0; i<(int)(n); i++) #define max(a,b) ((a) < (b) ? (b) : (a)) #define min(a,b) ((a) > (b) ? (b) : (a)) int dpx[8][1 << 16]; int dpn[8][1 << 16]; int w, h; int main(){ int cc = 0; int i, j, k, x, dx, dy; while(scanf("%d%d", &w, &h), w + h){ int g...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_258979/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_258979/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #include<math.h> int main(){ int a,b=600,c,d,e=0; while(scanf("%d",&a)!=EOF){ e=0; c=600/a; for(d=1;d<c;d++){ e=e+d*a*d*a*a; } printf("%d\n",e); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259020/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 d,a,s=0; while(scanf("%d",&d)!=EOF){ s=0; for(a=0;a<600/d-1;++a){ s+=d*(a+1)*d*(a+1)*d; } printf("%d\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x) { return x * x; } int area(int d){ int i; int x=0; int sum=0; for (i = 1; i < 600 / d; i++) { x += d; sum += d * f(x); } return sum; } int main(void){ int d; while(scanf("%d\n", &d) != EOF) { printf("%d\n", area(d));...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259129/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); while (t--) { int k, i, yes; long long hc, dc, hm, dm, w, a; scanf("%lld%lld%lld%lld%d%lld%lld", &hc, &dc, &hm, &dm, &k, &w, &a); yes = 0; for (i = 0; i <= k; i++) if ((hm + dc + (k - i) * w - 1) / (dc + (k - i) * w) <= (hc + i * a + dm - 1) / d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25918/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25918/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 a; while(scanf("%d",&a)!=EOF) { int x=0,y=0,s,i,total=0; for(i=0;i<(600/a);i++){ x=a*i; y=(x*x); s=y*a; total+=s; } printf("%d\n",total); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259244/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259244/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,x,ans=0; while(scanf("%d",&a)!=EOF){ x=600/a; c=a; for(i=0;i<x-1;i++){ b=c*c; ans+=a*b; c+=a; } printf("%d\n",ans); ans=0; c=0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259295/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259295/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 d,i,s=0; while(scanf("%d",&d)!=EOF){ i=0; s=0; while(i<600){ s+=d*i*i; i+=d; } /*if(d==600){ s=d*600*600; } */ printf("%d\n",s); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259352/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259352/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define MOD_BY 1000000007 int add(int a, int b) { return a + b - MOD_BY * (a + b >= MOD_BY); } int mul(int a, int b) { int r = 0; while (b > 0) { if (b & 1) r = add(r, a); a = add(a, a); b >>= 1; } return r; } int pou(int a, int b) { int r = 1; while (b > 0) { i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259396/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @kaizyou_cache_max = dso_lo...
#include <stdio.h> int n, k; long long p = 0; int main() { scanf("%d%d", &n, &k); while(--n) p += p / (k - 1) + 1; printf("%lld\n", p); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259439/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @p = dso_local local_unname...
/* ex4_3 tomatokan */ #include<stdio.h> int get_snow_depth(int,int);/*プロトタイプ宣言*/ int main(void){ int height_west,height_east; scanf("%d",&height_west); scanf("%d",&height_east); printf("%d",get_snow_depth(height_west,height_east));/*関数の呼び出し*/ return 0; } int get_snow_depth(int west,int east){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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_3 ryo_1129*/ #include<stdio.h> //プロトタイプ宣言、引数は2つの塔の見えている高さ int snowhight(int a,int b); int main(void){ //変数宣言 int a,b,ans; //入力 scanf("%d %d",&a,&b); //積雪量を出す関数の呼び出し ans = snowhight(a,b); //出力 printf("%d\n",ans); return 0; } //n番目の木の高さを出す関数、等差数列の和 int snowhight(int a,int b){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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_3 takafumi_ueki */ #include <stdio.h> #include <math.h> //プロトタイプ宣言 int tower(int n); int main(void){ int dif, height_west, height_east, ans; scanf("%d %d",&height_west,&height_east); //雪に埋れていても埋もれていなくても塔の高さの差は変わらない //西と東の塔の高さの差から東の塔の高さが何メートルか分かる dif = height_east - height_west; //東の塔の高...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259576/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a,&b); c=b-a; d=c*(c-1)/2; printf("%d",d-a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 height_tower_west, height_tower_east, answer; scanf("%d %d", &height_tower_west, &height_tower_east); answer = (1 + height_tower_east - height_tower_west) * (height_tower_east - height_tower_west) / 2 - height_tower_east; printf("%d\n", answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int h = 0; scanf("%d %d", &a, &b); for(i = 1; i <= b - a - 1; i++){ h += i; } printf("%d\n", h - a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j=0; scanf("%d %d",&a,&b); a = b - a; for(i=0;i<=a;i++)j=j+i; printf("%d\n",j-b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259749/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259749/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> //579 B. Finding Team Member typedef struct { int strength; int teammate; } team; int comp(const void *x, const void *y) { team * a = (team *) x; team * b = (team *) y; return a->strength - b->strength; } int main() { int n, i, j, parti...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2598/source.c" target datalayout = "e-m:e-p270: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.team = type { i32, i32 ...
#include <stdio.h> #include <math.h> int main(void) { long n,m; scanf("%ld %ld", &n, &m); long x[n],y[m]; for (long i = 0; i < n; i++) { scanf("%ld", &x[i]); } for (long i = 0; i < m; i++) { scanf("%ld", &y[i]); } long mod = pow(10,9)+7; long x_len[n-1],y_len[m-1]; for (long i = 0; i < n-1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259842/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define DIJKSTRA_MAX_NODE 1000 #define DIJKSTRA_MAX_EDGE 1000000 typedef struct { int from,to; double cost; } dijkstra_edge_t; typedef struct { int node; int from; double cost; } dijkstra_node_t; int dijkstra_edge_num; dijkstra_edge_t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259886/source.c" target datalayout = "e-m:e-p270: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.dijkstra_node_t = t...
#include <stdio.h> int main(){ char C; scanf ("%c", &C); printf ("%c\n", C+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_259950/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_259950/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; scanf("%c",&c); c++; printf("%c\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; scanf("%d", &t); while(t--){ char a[200001]; scanf(" %[^\n]",a); int count0=0, count1=0; for(int i=0; a[i]!='\0'; i++){ if(a[i]=='0') count0++; else count1++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26005/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26005/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 c[2]; scanf("%s", c); c[0]++; printf("%s", c); printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260093/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260093/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ch; scanf("%c",&ch); ch=ch+1; printf("%c",ch); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260136/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260136/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; scanf("%c",&c); printf("%c", c+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260194/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 9223372036854775807 #define PI 3.14159265358979 #define MIN(x,y) ((x)<(y)?(x):(y)) #define MAX(x,y) ((x)<(y)?(y):(x)) #define FOR(i,a,n) for(i=a;i<n;i++) #define MOD 1000000007 //#define MO...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260295/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260295/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { char s; scanf("%c", &s); s++; printf("%c\n", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260338/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ char c; scanf("%c",&c); printf("%c",c+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <math.h> int main(int argc, char **argv) { char C[2]; scanf("%s", C); printf("%c\n", C[0]+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ long long N; long long ans=0; scanf("%lld",&N); if(N & 1) { printf("0\n"); return 0; } for(long long i=10; i<= N; i*=5){ ans += N / i; } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 LNF 9223372036854775807 #define PI 3.14159265358979 #define MIN(x,y) ((x)<(y)?(x):(y)) #define MAX(x,y) ((x)<(y)?(y):(x)) #define FOR(i,a,n) for(i=a;i<n;i++) #define MOD 100...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260525/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @fac = dso_local local_unna...
#include <stdio.h> int main(void) { char a, b; scanf("%c %c", &a, &b); if ((a == 'H' && b == 'H') || (a == 'D' && b == 'D')) { printf("H"); } else { printf("D"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260569/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ char a; char b; scanf("%c %c", &a, &b); if(a=='H'){ if(b=='H'){ printf("H"); } else{ printf("D"); } } else{ if(b=='H'){ printf("D"); } else{ printf("H"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260611/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260611/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { char a, b; scanf("%c %c", &a, &b); if (a == b) printf("H\n"); else printf("D\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ char a[10],b[10]; scanf( "%c %c",a,b ); if( a[0] == b[0] ){ printf( "H" ); } else printf( "D" ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { char a,b; while (scanf("%c %c", &a, &b) != EOF) { getchar(); // printf("%c,%c\n", a, b); if (a == 'H') { if (b == 'H') printf("H\n"); else if (b == 'D') printf("D\n"); } else if (a == 'D') { if (b == 'H') printf("D\n"); else if (b == 'D') printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260770/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ char s[11]; int i,tmp,ans = 1000; scanf("%s",s); for(i=2;i<strlen(s);i++){ tmp = abs((s[i-2]-'0')*100 + (s[i-1]-'0')*10 + (s[i]-'0')-753); if(tmp<ans) ans = tmp; } printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260820/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260820/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ char S[11]; scanf("%s",S); int min=1000; for(int i=0;S[i+2] != '\0';i++){ int s=(S[i]-'0')*100+(S[i+1]-'0')*10+(S[i+2]-'0'); int diff=(753>=s)?753-s:s-753; if(diff<min){ min=diff; } } printf("%d\n",min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260886/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807 #define PI 3.14159265358979323846; #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<n;i++) #de...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_260958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_260958/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mod = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #define INF 10000 int main(void) { int size = 0; int min = INF; int min_sub; char S[20]; scanf("%s", S); for(int i=0; S[i] != '\0'; ++i) { size++; } for(int i=0; i<size-2; ++i) { int num = (S[i]-'0')*100 + (S[i+1]-'0')*10 + (S[i+2]-'0'); if(abs(min...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261029/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261029/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 200000 int main(void){ long a[N],b[N]; long n; long i,j,t=1,max=1; scanf("%ld",&n); for(i=0;i<n;i++) scanf("%ld",&a[i]); for(i=0;i<n-1;i++){ if(a[i]*2>=a[i+1]) t++; else{ if(t>max) max=t; t=1; } } if(t>max)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26108/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i,j,k,t,n,H[101],A[101],p; char Hn[22],An[22],ct,cc,a,b; scanf("%s",Hn); scanf("%s",An); scanf("%d",&n); for(i=0;i<101;i++) A[i]=H[i]=0; while(n--){ scanf("%d%c%c%d%c%c",&t,&a,&ct,&p,&b,&cc); if(ct=='h'){ if(cc=='y'){ if(H[p]==1){ printf("%s",Hn); printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26113/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i,j,k,time[2][3],work[3]; for(i=0;i<3;i++){ for(j=0;j<2;j++){ for(k=0;k<3;k++){ work[k]=0; scanf("%d",&time[j][k]); } } for(j=0;j<3;j++){ work[2-j]+=time[1][2-j]-time[0][2-j]; if(work[2-j]<0){ work[2-j]+=60; work[1-j]-=1; } } printf("%d %d %d\n",w...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261173/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261173/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ah, am, as; int Ah, Am, As; int bh, bm, bs; int Bh, Bm, Bs; int ch, cm, cs; int Ch, Cm, Cs; int AH, AM, AS; int BH, BM, BS; int CH, CM, CS; scanf("%d%d%d%d%d%d", &ah, &am, &as, &Ah, &Am, &As); scanf("%d%d%d%d%d%d", &bh, &bm, &bs, &Bh, &Bm, &Bs); scanf("%d%d%d%d%d%d", &ch, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define E_MAX 100000 #define V_MAX 10001 typedef struct edge { int s, t, w; } edge; edge edges[E_MAX]; int x[V_MAX]; int compare(const void *a, const void *b) { return (*(edge *)a).w - (*(edge *)b).w; } void initx(int n) { for(int i=0; i<n; i++) x[i] = i; } void u...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261281/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261281/source.c" target datalayout = "e-m:e-p270: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.edge = type { i32, ...
#include <stdio.h> #include <stdlib.h> #define N 200000 void hashclear(void); void hash_inc(long int); long int hash_getc(long int); typedef struct { long int value; long int count; } kv; kv mmm[2*N]; void hash_clear(){ long int t; for(t=0;t<2*N;t++){ mmm[t].count=0; mmm[t].value=-1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261331/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261331/source.c" target datalayout = "e-m:e-p270: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.kv = type { i64, i6...
#include<stdio.h> int main(void){ int N,l[10000],r[10000], ans=0; scanf("%d", &N); for(int i=0;i<N;i++){ scanf("%d%d",&l[i],&r[i]); ans+=r[i]-l[i]; } printf("%d\n",ans+N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261375/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261375/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ scanf("%*d"); int b,c; int cnt = 0; while(scanf("%d%d",&b,&c) != EOF){ cnt += c - b + 1; } printf("%d\n", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261418/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261418/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int sum=0; int l,r; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d",&l,&r); sum+=(r-l+1); } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261469/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261469/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int ans=0; for(i=0;i<N;i++){ int l,r; scanf("%d %d",&l,&r); ans+=r-l+1; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define datatype int typedef enum { false, true }Boolean; typedef struct node_sub node; typedef struct { datatype (*update_function)(node *r, datatype arg); datatype arg; }lazy_function; struct node_sub{ int N; datatype val; Boolean is_lazy; lazy_function lazy; struct...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261562/source.c" target datalayout = "e-m:e-p270: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 = type...
#include <stdio.h> static int n, l, r, sum; int main(void) { scanf("%d", &n); while (n--) { scanf("%d%d", &l, &r); sum += r - l + 1; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261612/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261612/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ char c[3][4]; for (int i = 0; i < 3; i++) { scanf("%s", c[i]); } printf("%c%c%c\n", c[0][0], c[1][1], c[2][2]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261656/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261656/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,x,count=0;; scanf("%d",&x); while(x>1) { if(x%2==1) count++; x=x/2; } printf("%d",count+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2617/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(){ char a[4],b[4],c[4]; scanf ("%s",a); scanf ("%s",b); scanf ("%s",c); // printf ("%s%s%s",a[1],b[2],c[3]); printf ("%c%c%c",a[0],b[1],c[2]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261757/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r,i,tmp; scanf("%d %d",&k,&r); tmp=k; while(tmp%10!=r & tmp%10!=0) tmp+=k; printf("%d\n",tmp/k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_26180/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_26180/source.c" target datalayout = "e-m:e-p270:32:32-p271: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[5][5]; int i, j; for (i = 0; i <3; i++) { for (j = 0; j <= 3; j++) { scanf("%c",&s[i][j]); } } for (i = 0, j = 0; i < 3; i++, j++) { printf("%c", s[i][j]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261843/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261843/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdint.h> // uint64_t #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) > (b) ? (b) : (a)) #define BUF_SIZE 20 #define DIVISOR 1000000007 int get_int2(int *a1, int *a2) { #ifdef BUF_SIZE char line[BUF_SIZE]; if(!fgets(line, BUF_SIZE...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261894/source.c" target datalayout = "e-m:e-p270: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 cost[101][101]; int main(void){ int n,k,a,b,c,i,j,z; const int def = 1000000000; for(;scanf("%d%d",&n,&k),n|k;){ for(i=1;i<=n;i++)for(j=1;j<=n;j++)cost[i][j]=def; z=0; for(;k--;){ scanf("%d",&a); if(a){ scanf("%d%d%d",&a,&b,&c); if(cost[a][b]>c){ cost[a][b] = cost[b]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261937/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261937/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 lex_smaller(char* s1, char* s2) { int i; for (i = 0; s1[i] != 0 && s2[i] != 0; i++) { if (s1[i] < s2[i]) return 1; else if (s1[i] > s2[i]) return -1; } if (s1[i] == s2[i]) return 0; else if (s1[i] == 0) return 1; else return -1; } int main() { int i, N, M; char s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_261995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_261995/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &n); char s[102][11]; int i; for (i = 0; i < n; i++) scanf("%s", s[i]); int m; scanf("%d", &m); char t[102][11]; for (i = 0; i < m; i++) scanf("%s", t[i]); int ans = 0; int k, j; for (i = 0; i < n; i++) { k = 0; for (j = 0; j < n;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262037/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262037/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void){ char s[110][10],t[110][10]; int i,j,n, m; int max=0; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%s", s[i]); } scanf("%d", &m); for (i = 0; i < m; i++){ scanf("%s", t[i]); } for (i = 0; i < n; i++){ int count = 0; for (j = 0; j < n; j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262080/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #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 VERYBIG 200000000000007LL #define MOD 1000000007 typede...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262123/source.c" target datalayout = "e-m:e-p270: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 [3000...
#include <stdio.h> #include <inttypes.h> #define MOD_BY UINT32_C(1000000007) uint32_t add(uint32_t a, uint32_t b) { return a + b - MOD_BY * (a + b >= MOD_BY); } uint32_t sub(uint32_t a, uint32_t b) { return b == 0 ? a : add(a, MOD_BY - b); } uint32_t mul(uint32_t a, uint32_t b) { uint32_t r = 0; while (b > 0) {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262167/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262167/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 PI 3.141592653589 int main(void){ double r,x,y; scanf("%lf",&r); x=r*r*PI; y=2*r*PI; printf("%f %f\n",x,y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { //3.142857 double a,b; scanf("%lf",&a); b=3.14159265359; printf("%.6lf %.6lf\n",a*a*b,2*b*a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262260/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, char *argv[]) { double r; double s, l; scanf("%lf", &r); s = r * r * M_PI; l = 2 * r * M_PI; printf("%f %f\n", s, l); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262318/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double r; double area, cir; scanf("%lf", &r); printf("%f %f", r*r*M_PI, 2*r*M_PI); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262369/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262369/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 r; double pi = 3.141592653589; scanf("%lf", &r); printf("%.6lf %.6lf\n", r*r*pi, 2*r*pi); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 PI 3.1415926535897932 int main(void){ double r; scanf("%lf", &r); printf("%f %f\n", r*r*PI, 2*r*PI); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262462/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262462/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double x,y,y2; x=3.14159265359; scanf("%lf",&a); y=a*a*x; y2=a*2*x; printf("%f %f\n",y,y2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 r,p,x,y; scanf("%lf",&r); p=3.14159265359; x=r*r*p; y=2*r*p; printf("%lf %lf\n",x,y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262549/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ double r; scanf("%lf",&r); printf("%f %f\n",r*r*M_PI,2*r*M_PI); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262592/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { double r; double a,b; scanf("%lf",&r); a = r*r*3.141592653589; b = 2*r*3.141592653589; printf("%f %f\n",a,b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_262635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_262635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...