Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> int main() { int n1,n2,n3,s; scanf("%d%d%d",&n1,&n2,&n3); s=n1+n2+n3; if(s>=22){ printf("bust"); } else{ printf("win"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142844/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3]; int i,sum; sum=0; for(i=0;i<=2;i++){ scanf("%d",&a[i]); sum+=a[i]; } if(sum<=21) puts("win"); else puts("bust"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b,c,i,n; scanf("%d%d%d",&a,&b,&c); i=a+b+c; if(i>=22) { printf("bust"); } else {printf("win");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142930/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142930/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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+C >= 22){ printf("bust"); }else{ printf("win"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_142974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_142974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, y, z; scanf("%d %d %d", &x, &y, &z); if ((x + y + z) >= 22) printf("bust"); else { printf("win"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d%d",&n,&k); int a[100]; int cnt=0; int b[100]; for(int i=0;i<n;i++) { scanf("%d",&a[i]); int j; for(j=0;j<i;j++) { if(a[i]==a[j]) { break; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14306/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14306/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 A1,A2,A3,A4; scanf("%d %d %d",&A1,&A2,&A3); A4 = A1+A2+A3; if(A4>21) printf("bust\n"); else printf("win\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143102/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143102/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 2494 Sliding GCD // 2018.3.18 bal4u #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100000 #define DMAX 130 // max 126 int t[MAX+1][DMAX+1], w[MAX+1]; int c[MAX+1]; void divisor_tble(int N) { int i, k; for (i = 2; i <= N; i++) { for (k = i<<1; k <= N; k += i) t[k][w[k]++] = i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143146/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @t = dso_local local_unname...
#include<stdio.h> #include<string.h> int main(){ int n,i; scanf("%d",&n); char s[101][101]; int a[101]; for(i=0;i<n;i++){ scanf("%s",s[i]); a[i]=strlen(s[i]); } /*//for(i=0;i<n;i++){ // printf("%s\n",s[i]); // printf("len=%d",strlen(s[i])); //}*/ int pd=1,j,t; char *st; for(i=0;i<n;i++){ if(pd==0){ break; } for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14319/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <string.h> char map[60][60], v[60][60], visited[60][60]; int H, W; int dr[]={-1, 0, 1, 0}, dc[]={0, -1, 0, 1}; int dfs(int r, int c, int k) { int i; char *t=&v[r][c]; *t|=k; for(i=0;i<4;++i) { int nr=r+dr[i]; int nc=c+dc[i]; if (nr<0 || nr>=H || nc<0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143254/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143254/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dr = dso_local local_unnam...
#include <stdio.h> #include <string.h> #define put(x, y, z) (abacus[(x)][(y)] = z) char abacus[8][6]; int main(){ int n, i, j, a, f = 0; while(scanf("%d", &n) != EOF){ for(i = 0;i < 8;i++) for(j = 0;j < 5;j++) put(i, j, '*'); for(i = 0;i < 5;i++) put(2, i, '='); for(i = 0;i < 5; i++){ a = n % 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143311/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <float.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_SIZE_MAX 305 // 最大サイズ // 内部変数 static FILE *szpFpI; // 入力 static int siW, siH; // 幅・高さ static char sc2Mass[D_SIZE_MAX][D_SIZE_MAX]; /...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143355/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143355/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define DBL(a) ((a) * (a)) #define EPS 1e-8 int main() { char buf[256]; double x1, y1, x2, y2, x3, y3, xp, yp; double s, a, b, c, p1, p2, p3; double sur[4]; int i; while (fgets(buf, 256, stdin)) { sscanf(buf, "%lf%lf%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143399/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143399/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include <stdio.h> #include <math.h> int main() { double x[3]; double y[3]; double point[2]; int i; while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf",&x[0],&y[0],&x[1],&y[1],&x[2],&y[2],&point[0],&point[1]) != EOF) { double Tsurface; double Psurface; x[1] -= x[0]; x[2] -= x[0]; point[0] -= x[0]; y[1] -= ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143485/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143485/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1,x2,x3,y1,y2,y3,xp,yp; double ab[2],ac[2],ap[2]; double alpha, beta; while(scanf("%lf %lf %lf %lf %lf %lf %lf %lf", &x1,&y1,&x2,&y2,&x3,&y3,&xp,&yp) != EOF){ ab[0] = x2 - x1; ab[1] = y2 - y1; ac[0] = x3 - x1; ac[1] = y3 - y1; ap[0] = xp - x1; ap[1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143528/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143528/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1, y1, x2, y2, x3, y3, xp, yp; double pa[2], pb[2], pc[2], ab[2], ac[2], bc[2]; double z1, z2, z3; int i; while(fscanf(stdin,"%lf %lf %lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3, &xp, &yp) != EOF){ //ベクトルの計算 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143571/source.c" target datalayout = "e-m:e-p270: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 n; scanf("%d", &n); int i; int a[100005]; for (i = 0; i < n; i++) scanf("%d", &a[i]); int k = 0; for (i = 0; i < n; i++) if (a[i] % 2 == 1) k++; if (k % 2 == 0) printf("YES\n"); else printf("NO\n"); re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143614/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int N; scanf("%d", &N ); int A; int k = 0; int i; int ans = 1; int num = 0; for( i = 0; i < N; i++ ){ scanf("%d", &A); num++; if( A % 2 ) k++; } if( (k % 2) && num != 1 ) ans = 0; if( ans )puts("YES"); else{ puts("NO");} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143665/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143665/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int i,l,a,x,b,r,num; for(i = 0; i <1000; i++){ scanf("%d %d", &a, &b); if(a == 0 && b == 0) break; if(a < b){ x = b; b = a; a = x; } num = 0; for(l = 0; b != 0; l++){ r = a%b; a = b; b = r; num++; } printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143708/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count = 0; void init(void) { count = 0; } int gcd(int x, int y) { count++; return (y ? gcd(y, x % y) : x); } int main(void) { int x, y; int res; while (scanf("%d %d", &x, &y), x){ init(); if (x > y){ res = gcd(x, y); } else { res = gcd(y, x); } printf("%d %d\n", res, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143780/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143780/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> int main() { int a,b; scanf("%d %d",&a,&b); if((a+b)%2==0){ printf("%d",(a+b)/2); } else{ printf("%d",(a+b)/2+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143823/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143823/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b; scanf("%d" "%d", &a , &b); if((a+b)% 2 == 0){ printf("%d",(a+b)/2); } else{ printf("%d",(a+b)/2 + 1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143867/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143867/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/*Author: Aftab Hossain Shakib*/ #include<stdio.h> int main() { int q,i; long long int n; scanf("%d",&q); while(q--){ scanf("%lld",&n); long long int a[n+1],sum=0; for(i=0;i<n;i++){ scanf("%lld",&a[i]); sum+=a[i]; } if(sum%n==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14391/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if((a+b)%2!= 0) printf("%d\n",(a+b)/2+1); else printf("%d\n",(a+b)/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143953/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143953/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double x; scanf("%lf %lf",&a,&b); x=(a+b)/2; if(x-(int)x>=0.5){ x=(int)x+1; } else{ x=x; } printf("%.0f\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_143997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_143997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { float a,b,x,n; scanf("%f %f",&a,&b); x=(a+b)/2; n=ceil(x); printf("%.f\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144046/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144046/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t, l, r; scanf("%d", &t); while(t--){ scanf("%d%d", &l, &r); if(r < 2 * l) printf("-1 -1\n"); else printf("%d %d\n", l, 2 * l); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<math.h> #include<string.h> int main() { long long int t,a=0,b=0,i,j,n,s=0,k; scanf("%lld",&t); for(j=0;j<t;j++) { scanf("%lld %lld",&n,&k); if(2*n<=k) printf("%lld %lld\n",n,2*n); else printf("-1 -1\n"); } return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14414/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
// AOJ 0056: Goldbach's Conjecture // 2017.10.28 bal4u@uu #include <stdio.h> #include <stdlib.h> #define MAX 50000 #define HALF 2761 // prime[2760]=24989, prime[2761]=25013 char table[MAX+1]; // zero: if prime int sz, prime[5200] = { // prime[46] = 223, max sz = 5132 3, 5, 7, 11, 13, 17, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144183/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144183/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @prime = dso_local local_un...
#include <stdio.h> #include <stdlib.h> int main() { int i,t; scanf("%d",&i); for(t=0;t<i;t++) { int l,r; scanf("%d %d",&l,&r); if(l*2<=r) printf("%d %d",l,2*l); else printf("-1 -1"); if(t!=i-1) printf("\n"); } return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14427/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14427/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i,j; char str[100]; while(scanf("%s",str) != EOF){ for(i = 0;str[i] != 0;i++){ if(str[i] == '@'){ for(j = 0;j < str[i + 1] - '0';j++) printf("%c",str[i + 2]); i += 2; } else printf("%c",str[i])...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int n; while((scanf("%c",&c))!=EOF){ if(c == '@'){ scanf("%c",&c); n = c - '0'; scanf("%c",&c); while(n-- > 0){ printf("%c",c); } }else{ printf("%c",c); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144370/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144370/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upll(const vo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144464/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144464/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @unicnt = dso_local local_u...
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 #define size 524288 int max(int a,int b){if(a>b){return a;}return b;} in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144594/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144594/source.c" target datalayout = "e-m:e-p270: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 { i64, i6...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) ll ans; int main(){ int a,b,c,x,y; scanf("%d%d%d%d%d",&a,&b,&c,&x,&y); if(a+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144637/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(){ char s[101]; long long k; scanf("%s",s); scanf("%lld",&k); int i=0,l=strlen(s); while(i<l&&s[i]=='1'){ i++; } if(l==1){ printf("%c",s[0]); return 0; } if(i>=k){ printf("1"); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144680/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144680/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; int i,count=0; long int K; scanf("%s",S); scanf("%ld",&K); for(i=0;i<K;i++){ if(S[i]!='1'){ printf("%c\n",S[i]); return 0; } } printf("1\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144723/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144723/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> const long long gosencho = 5000000000000000; int main (void) { char s[101]; char *p = s; long long k; double digit = 0; scanf("%s", s); scanf("%lld", &k); while (*p) { digit += pow((double)(*p - '0'), (double)gosencho); if (digit >= k)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144774/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @gosencho = dso_local local...
#include <stdio.h> int main(void) { int n, ncopy; int sum = 0; scanf("%d", &n); ncopy = n; while (n > 0) { sum += n % 10; n /= 10; } if (ncopy % sum == 0) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144839/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ char numero[11234]; scanf("%s", numero); int digitos = 0, numeroint = atoi(numero); for (int i = 0; i < strlen(numero); i++){ digitos += numero[i] - '0'; } if (numeroint % digitos == 0) printf("Yes\n"); e...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int sum(long long int number_n) { if(number_n < 10) { return number_n; } else { return (number_n % 10) + sum(number_n / 10); } } int main() { int sum_number; long long int number_n; scanf("%lld", &number_n); sum_number = sum(number_n); if(number_n % sum_number == 0) { pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144925/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144925/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count=0; scanf("%d",&a); b = a; while( a > 0){ count = count + a % 10; a = a / 10; } if( b % count == 0 ) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_144976/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_144976/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> void harshed_num(int n){ int harsh = n%10; for(int buf=n;buf>0;buf /= 10) harsh += (buf/10)%10; if(n%harsh == 0) printf("Yes"); else printf("No"); } int main(){ int n; scanf("%d",&n); harshed_num(n); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145018/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0,nn; scanf("%d",&n); nn=n; while(nn){ m+=nn%10; nn/=10; } if(n/m*m==n) printf("Yes\n"); else printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145061/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145061/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 score[100][5] = {0}; int total = 0; int high[100]; int low[100]; int i; int j = 0; int testcase; while(1){ scanf("%d",&testcase); if(testcase == 0) break; for(i=0;i<testcase;i++){ scanf("%d %d %d %d %d",&score[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145104/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145104/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* ex 7_1 terakura */ #include <stdio.h> typedef struct point{ int x_elem; int y_elem; }point; //頂点を移動させる関数 point shift_point(point point_p, int x_diff, int y_diff){ point_p.x_elem -= y_diff; point_p.y_elem += x_diff; return point_p; } int main(void){ int x_diff, y_diff; point poin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145155/source.c" target datalayout = "e-m:e-p270: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,...
/* ex7_1 saitomo*/ #include<stdio.h> //頂点を表す構造体point を定義 typedef struct point{ int x_elem; int y_elem; }point; //プロトタイプ宣言 point shift_point(point vec1,point vec2); int main(void){ point vec1,vec2,vec3,vec4; scanf("%d%d%d%d",&vec1.x_elem,&vec1.y_elem,&vec2.x_elem,&vec2.y_elem); vec3=shift_point(v...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145199/source.c" target datalayout = "e-m:e-p270: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,...
/* ex7_1 sachiyan */ #include <stdio.h> #include <stdlib.h> //構造体宣言 typedef struct point{ int x_elem; int y_elem; }point; //座標yを中心とし、xを-90度回転させるコード point shift_point(point x, point y){ point z; //回転させるベクトルを求める point dif = {(x.x_elem - y.x_elem), (x.y_elem - y.y_elem)}; //回転させるベクトルdifを-90度回...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145249/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145249/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int x1, y1, x2, y2; scanf("%lld%lld%lld%lld", &x1, &y1, &x2, &y2); int slope[] = {y1-y2, x2-x1}; long long int x3, y3, x4, y4; x3 = x2 + slope[0], y3 = y2 + slope[1], x4 = x1 + slope[0], y4 = y1 + slope[1]; printf("%lld %lld %lld %lld\n", x3, y3, x4, y4); return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145292/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145292/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1, y1, x2, y2, x3, y3, x4, y4; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); x3 = x2 - (y2 - y1); y3 = y2 + (x2 - x1); x4 = x1 - (y2 - y1); y4 = y1 + (x2 - x1); printf("%d %d %d %d\n", x3, y3, x4, y4); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145335/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int x[4], y[4]; int i, j, k; scanf("%d %d %d %d", &x[0], &y[0], &x[1], &y[1]); x[2] = x[1] - (y[1] - y[0]); y[2] = y[1] + (x[1] - x[0]); x[3] = x[2] - (y[2] - y[1]); y[3] = y[2] + (x[2] - x[1]); printf("%d %d %d %d\n", x[2], y[2], x[3], y[3]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145379/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145379/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1, y1, x2, y2; scanf("%d %d %d %d",&x1,&y1,&x2,&y2); int x3 = x2-(y2-y1); int y3 = y2+(x2-x1); int x4 = x3-(y3-y2); int y4 = y3+(x3-x2); printf("%d %d %d %d",x3,y3,x4,y4); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145429/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145429/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1, y1, x2, y2, x3, y3, x4, y4; int change_x, change_y; scanf("%d %d %d %d", &x1, &y1, &x2, &y2); x3 = x2 + (y2 - y1) * (-1); y3 = y2 + (x2 - x1); x4 = x3 + (x2 - x1) * (-1); y4 = y3 + (y2 - y1) * (-1); printf("%d %d %d %d", x3, y3, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145472/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int n,a,b; scanf("%lld%lld%lld",&n,&a,&b); long long int k=n/(a+b); if(n%(a+b)<=a){ printf("%lld",k*a+n%(a+b)); return 0; } else { printf("%lld",k*a+a); return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145515/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> typedef long long ll; int main(void){ ll N, A, B; ll ans; ll rem; scanf("%lld %lld %lld", &N, &A, &B); ans = (N / (A + B)) * A; rem = N % (A + B); ans += ((rem > A) ? A : rem); printf("%lld", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145559/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 loop(i, l, r) for(i=l; i<r; i++)/*Instead of function, (for).*/ #define rep(i,r) for(i=0; i<r; i++) #define Max(a, b) ((a) > (b) ? (a) : (b)) #define Min(a, b) ((a) < (b) ? (a) : (b)) typedef long long int lli; /*Return Combination ,(nCr)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145601/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145601/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { long long N, A, B; long long ret = 0; long long tmp; scanf("%ld %ld %ld", &N, &A, &B); ret += A * (N / (A + B)); tmp = N % (A + B); if (tmp >= A) { ret += A; } else { ret += tmp; } printf("%ld", ret); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145645/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145645/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <strings.h> #include <stdlib.h> int main(void) { unsigned long long n; unsigned long long a; unsigned long long b; scanf("%llu %llu %llu", &n, &a, &b); unsigned long long res; res = (n / (a + b)) * a; res += (n % (a + b) > a ? a : (n % (a + b))); printf("%llu",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145689/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ long n,a,b; long sum; long x,amari; long ans = 0; scanf("%ld %ld %ld",&n,&a,&b); sum = a+b; if(n == 0 || sum == 0){ printf("0\n"); return 0; } x = n/sum; amari = n % sum; if(sum >= n){ if(n <= a){ pri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145731/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145731/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ long long int n,a,b,set=0,ans=0; scanf("%lld%lld%lld",&n,&a,&b); if(n>=a+b){ set=n/(a+b); } n=n-(a+b)*set; if(a>=n){ ans=n+a*set; printf("%lld",ans); return 0; } else{ ans=a+a*set; printf("%lld",ans); return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145775/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int comp(const void *a, const void *b){ return *(long*)a-*(long*)b; } int main(void){ int n, i; long l[100000][2]; scanf("%d", &n); for(i=0; i<n; i++){ int a, b; scanf("%d%d", &a, &b); l[i][0] = a+b; l[i][1] = a-b; } qsort(l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145818/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145818/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <limits.h> #include <math.h> int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */ int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */ int cmp_char(con...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145869/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145869/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]; int count=0,count2=0; scanf("%s",s); if(s[count2]=='+'){count++;} else {count--;} count2++; if(s[count2]=='+'){count++;} else {count--;} count2++; if(s[count2]=='+'){count++;} else {count--;} count2++; if(s[count2]=='+'){count++;} e...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145919/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145919/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[5]; int i,ans; ans = 0; scanf("%s",s); for (i=0;i<4;i++){ if(s[i] == '+'){ ans +=1; }else{ ans -=1; } } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145962/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145962/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,imagine=0; char S[4]; scanf("%c%c%c%c",&S[0],&S[1],&S[2],&S[3]); for(i=0;i<4;i++){ if(S[i]=='+') imagine++; else imagine--; } printf("%d",imagine); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n = 0; char a; char b; char c; char d; scanf("%c%c%c%c", &a, &b, &c, &d); switch (a) { case '+': n++; break; case '-': n--; break; } switch (b) { case '+': n++; break; c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int x = 0; for (int i = 0; i < 4; i++) x += (getchar() == '+' ? +1 : -1); printf("%d\n", x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146091/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146091/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void){ int ct = 0; char a[5] = {'\0'}; int i; scanf("%s", a); for( i =0 ; a[i] != '\0'; i++){ if(a[i] == '+'){ ct++; }else{ ct--; } } printf("%d\n", ct); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146134/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146134/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k; int N=0; char A[4]; scanf("%s", A); for(i=0;i<4;i++){ if(A[i]=='-')N--; if(A[i]=='+')N++; } printf("%d", N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146185/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146185/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int h,m,s,hh,mm,ss,tsec,tsec3; while(scanf("%d%d%d",&h,&m,&s) , h != -1){ tsec = h * 3600 + m * 60 + s; tsec = 7200 - tsec; tsec3 = tsec * 3; hh = tsec / 3600; tsec = tsec - hh * 3600; mm = tsec / 60; tsec = tsec - mm * 60; ss = tsec; printf("%02d:%02d:...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146228/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146228/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1000],i; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&a[i]); } for(i=0;i<n;i++) { for(size_t t=0;t<a[i];t++) printf("3 "); printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int n; scanf("%d", &n); int f[n][10]; for (int i = 0; i < n; i++) { for (int j = 0; j < 10; j++) { scanf("%d", &f[i][j]); } } long p[n][11]; for (int i = 0; i < n; i++) { for (int j = 0; j < 11; j++) { scanf("%ld", &p[i][j]); } } int bit[10]; bit[0] = 1; f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k,l; int n; int f[105][15]; int p[105][15]; int t[15]; int s[105]; int point; for(i=0;i<100;i++) { s[i]=0; } int max; for(i=0;i<10;i++) { t[i]=0; } t[0]=1; scanf("%d",&n); for(i=0;i<n;i++) { for(j=0;j<10;j++) { scanf("%d",&f[i][j]); } } for(i=0;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int x,y,z; scanf("%d %d %d",&x,&y,&z); int ans=x/(y+z),r=x%(y+z); printf("%d",r>=z?ans:ans-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 comprimento, pessoa, espaco, qtd_pessoas = 0; scanf("%d %d %d", &comprimento, &pessoa, &espaco); for (int i = 1;;i++){ if (comprimento >= (pessoa*i + espaco*(i+1))) qtd_pessoas = i; else break; } printf("%d\n", qtd_pessoas);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k=0; scanf ("%d%d%d",&a,&b,&c); a=a-c; for (a;a>=0;a=a-b-c){ k++; } printf ("%d",k-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146545/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146545/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int x, y, z, n; scanf("%d %d %d", &x, &y, &z); printf("%d", (x - z) / (y + z) ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146589/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146589/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int x,n,m,f; scanf("%d %d %d",&f,&m,&n); x=(f-n)/(m+n); printf("%d",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146639/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,i; scanf("%d",&t); while(t--) { scanf("%d",&x); for(i=1;i<=x;i++) printf("%d ",1); printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14669/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,b,c,d; c = 1; d = 0; scanf("%d%d",&a,&b); while(c < b){ c += a - 1; d++; } printf("%d",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146732/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a=0,b=0; int i; scanf("%d%d",&a,&b); for( i=0;i<30;i++){ if(b<=(a-1)*i+1) break; } printf("%d",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146776/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146776/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,kuti_count=1, tap_count=0; scanf("%d %d",&A, &B); while(kuti_count < B){ kuti_count += A-1; tap_count++; } printf("%d\n",tap_count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146819/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146819/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); a --; b --; printf("%d",(b + (a - 1)) / a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146862/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,y,sum=1,n=0;//存储两个整数 scanf("%d%d",&x,&y); //采取累加的办法 while(sum<y) { sum+=x-1; ++n; } printf("%d\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, t=0, c=0; scanf("%d %d", &a, &b); if(b == 1) { printf("0\n"); return 0; } while(c<=b) { c += (a-1); t++; if(c+1>=b) break; } printf("%d\n", t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146949/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,cnt; scanf("%d %d",&a,&b); if(b<=1){ printf("0\n"); return 0; } cnt = (b-2)/(a-1); cnt+=1; printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146992/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ori = 1; int A,B,ans = 0; scanf("%d %d",&A,&B); while(ori<B) { ori+=(A-1); ans++; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147034/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,M,X[500],x,i; int Y[500] = {0}; scanf("%d",&N); scanf("%d",&M); for(i = 0;i < M;i++) { if(M == 0) break; else { scanf("%d",&Y[i]); if(Y[i] == 0) { Y[i] = 2; } } } x = N-M; printf("%d\n",x-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 long memo[20]; long long get_add(long long input); long long get_add2(long long count,int count2) { long long result; if(memo[count2]>0)return memo[count2]-1; result=get_add(count-1); memo[count2]=result+1; return result; } long long get_add(long long input) { long lo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147142/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @memo = dso_local local_unn...
#include <stdio.h> #define INF 100001 int main (void){ int N; int a,b; int count[INF]={};//テゥツ?催・ツ按療」ツ?ョテヲツ閉ーテ・ツュツ療」ツ?ッテァツァツ?」ツ?凝」ツつ嘉ィツヲツ凝」ツ?淌・ツ渉凝ゥツ?氾」ツ?ョテゥツ?」テ」ツつ古」ツ?ヲティツ。ツ古」ツ?湘、ツコツコテヲツ閉ー int i,max=0; scanf("%d", &N); while(N){ scanf("%d %d",&a ,&b); for(a--;a!=b;a++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100010]; int i,ans=0; scanf("%s",s); for(i=0;i<strlen(s)-1;i++){ if(s[i]!=s[i+1]) ans++; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 mod 10000000000007 int main() { int testcases; scanf("%d",&testcases); for(int i=0;i<testcases;i++) { int number_123; scanf("%d",&number_123); for(int u1=1;u1<=number_123;u1++) { int x1=number_123,y1=number_123; while(x1>0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14728/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14728/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdint.h> #include<inttypes.h> typedef int32_t i32; typedef int64_t i64; const i32 mod = 1000000007; i32 inv (i32 a) { i32 t = 1; while (a > 1) { t = (i64) t * (mod - mod / a) % mod; a = mod % a; } return t; } i32 comb (i64 n, i64 k) { if (k > n - k) k = n - k; i64 nu ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147322/source.c" target datalayout = "e-m:e-p270: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 <float.h> #include <inttypes.h> #include <limits.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif int32_t nextint(void){ char c=getchar_unlocked(); w...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147366/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i...
#include <stdio.h> #include <stdlib.h> int N, M; int ec[114514]; int* es[114514]; void ae(int f, int t) { es[f] = realloc(es[f], sizeof(int) * (ec[f] + 1)); if (es[f] == NULL) exit(2); es[f][ec[f]++] = t; } int ayaneru[114514]; int qs, qe; int q[114514]; int main(void) { int i; if (scanf("%d%d", &N, &M) != 2)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @es = dso_local local_unnam...
#include<stdio.h> #define Max 500000 #define term 1000000000 int Left[(Max/2)+2], Right[(Max/2)+2]; int c=0; void merge(int e[], int n, int left, int mid, int right){ int i,j,k; int x = (mid-left); int y = (right-mid); for ( i=0; i<x; i++ ) Left[i] = e[left+i]; for ( i=0; i<y; i++ ) Right[i] = e[mi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147452/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> /*#include <math.h> INFINITY*/ #define MAX 500000 #define INFINITY 1000000001 void mergeSort(int *, int, int); void merge(int *, int, int, int); int L[MAX / 2 + 2], R[MAX / 2 + 2]; int count = 0; int main(){ int *A, n, i; scanf("%d",&n); A = malloc(n * sizeof(int)); fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include<stdio.h> #define INFTY 1000000001 #define N 500000 void merge(int,int,int,int); void mergeSort(int,int,int); int S[N],count=0; int main(){ int n,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&S[i]); } mergeSort(n,0,n); for(i=0;i<n;i++){ if(i>0) printf(" "); printf("%d",S[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #define INF 2000000000 int L[250002],R[250002]; int cnt=0; void merge(int A[],int n,int l, int m, int r){ int i,j,k,n1,n2; n1 = m - l; n2 = r - m; for (i = 0; i < n1; i++) { L[i] = A[l + i]; } for (i = 0; i < n2; i++) { R[i] = A[m + i]; } L[n1] = INF; R[n2] = INF; i = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local local_unna...
#include<stdio.h> int main(){ int t,n; scanf("%d",&t); while(t--){ scanf("%d",&n); for(int u=1;u<=n;u++){ int x=n; int y=n; while(x>0){ for(int i=1;i<=u&&x>0;i++){ printf("("); x--; } printf(")"); y--; } for(int j=1;j<=y;j++){ printf(")")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14764/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...