Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define PI 3.141592653589793238 int main(void) { int r; scanf("%d", &r); printf("%f\n", (float) r * (float) 2 * (float) PI); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_339957/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_339957/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* BinaryTree + Heap */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> struct node { struct node *left; struct node *right; int key; int priority; }; struct node *delete(struct node *T, int key); struct node *_delete(struct node *T, int key); struct node *rightRotate(st...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340041/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <stdio.h> #include <math.h> int main(void) { double a, b, C; scanf("%lf%lf%lf", &a, &b, &C); printf("%f\n", a * b * sin(C / 180 * M_PI) / 2); printf("%f\n", a + b + sqrt(a * a + b * b - 2 * a * b * cos(C / 180 * M_PI))); printf("%f\n", b * sin(C / 180 * M_PI)); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340085/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,C; scanf("%lf %lf %lf",&a,&b,&c); C = c*M_PI/180; d = sqrt(a*a+b*b-2*a*b*cos(C)); printf("%f %f %f\n",a*b*sin(C)/2,a+b+d,b*sin(C)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340128/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b, c, s, l, h; double rad, cl; s = 0.0; scanf("%lf %lf %lf", &a, &b, &c); rad = c * M_PI / 180; s = 0.5 * a * b * sin(rad); cl = a*a+b*b-2*a*b*cos(rad); l = a + b + sqrt(cl); h = 2.0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 getMin(int data[], int n){ int min = data[0]; int i; for(i=0; i<n; i++){ if(min > data[i]){ min = data[i]; } } return min; } int main(){ int data[10]; int n; int i; int min; scanf("%d", &n); for(i=0; i<n; i++){ scanf("%d", &data[i]); } min = getMin(data, n); i=1; while(i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340229/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340229/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// 1の方を引く方針だけど、0を数える方がいい #include<stdio.h> typedef long long int ll; int MAX(int a, int b){return a>b?a:b;} int main(void){ ll n,m; scanf("%lld%lld", &n,&m); ll ans = 0; if(n==1 && m==1){ ans = 1; }else if(n==1 && m!=1){ ans = m-2; }else if(n!=1 && m==1){ ans = n-2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,M; long ans; scanf("%ld %ld",&N,&M); if(N>=3&&M>=3){ ans = (M-2)*(N-2); } if(N>=3&&M==2){ ans = 0; } if(N>=3&&M==1){ ans = N-2; } if(N==2&&M>=3){ ans = 0; } if(N==1&&M>=3){ ans = M-2; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define max(p,q)((p)>(q)?(p):(q)) int dp1[5010][5010]; int dp2[5010][5010]; int a[5010]; int main(){ int n,k; scanf("%d%d",&n,&k); rep(i,1,n+1)scanf("%lld",a+i); dp1[0][1]=1; //dp1[i][j]=a[1..i]でj-1が作れるか? rep(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,j,k,l; char str[100001]; scanf("%s",str); l=strlen(str); if(l==2){ puts(str[0]==str[1]?"1 2":"-1 -1"); return 0; } for(i=0;i<l-2;i++){ if(str[i]==str[i+1] || str[i]==str[i+2] || str[i+1]==str[i+2]){ printf("%d %d\n",i+1,i+3); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W, H, x, y, r; scanf("%d", &W); scanf("%d", &H); scanf("%d", &x); scanf("%d", &y); scanf("%d", &r); if ((x - r >= 0) && (x + r <= W) && (y - r >= 0) && (y + r <= H)) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340452/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,h,x,y,r,n=0; scanf("%d%d%d%d%d", &w, &h, &x, &y, &r); if(x - r >= 0 && x + r <= w) n += 1; if(y - r >= 0 && y + r <= h) n += 1; if(n == 2) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w, h, x, y, r; scanf("%d %d %d %d %d", &w, &h, &x, &y, &r ); if( ( (w - x) < r) || ( ( h - y) < r) || (x < r) || (y < r)){ printf("No\n"); }else{ printf("Yes\n"); } return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); // if(x > 0 && y > 0){ if(x - r >= 0 && y - r >= 0 && x + r <= W && y + r <= H){ printf("Yes\n"); } else{ printf("No\n"); } //} // else{ //printf("No\n"); //} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include "stdio.h" int main(int argc, char const *argv[]) { int W,H,x,y,r; scanf("%d",&W); scanf("%d",&H); scanf("%d",&x); scanf("%d",&y); scanf("%d",&r); if(x-r<0||x+r>W||y+r>H||y-r<0) printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340632/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if((r > x || r > y)||(r > (W - x) || r > (H - y))) { printf("No\n"); } else { printf("Yes\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340690/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340690/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W, H, x, y, r; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if(x >= r && y >= r && (H - r) >= y && (W - r) >= x) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340740/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340740/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// // main.c // Practice // // Created by hoshino on 2015/10/19. // Copyright ?? 2015??´ hoshino. All rights reserved. // #include <stdio.h> int main(void) { int W,H,x,y,r; scanf("%d %d %d %d %d", &W,&H,&x,&y,&r); if(x-r<0 || x+r>W){ printf("No\n"); }else if(y-r<0 || y+r>H){ print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340784/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w, h, x, y, r; int a, b, c, d; scanf("%d %d %d %d %d",&w ,&h ,&x ,&y ,&r); a = x + r; b = y + r; c = x - r; d = y - r; if(a > w || b > h)printf("No\n"); else if(0 > c || 0 > d)printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340827/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if ( (x + r) <= W && (y + r) <= H && (x - r) >= 0 && (y - r) >= 0) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340878/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if(x+r<=W&&x-r>=0&&y+r<=H&&y-r>=0){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340920/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w, h, x, y, r; scanf("%d %d %d %d %d", &w, &h, &x, &y, &r); if ( 0 <= (x-r) && (x+r) <= w && 0 <= (y-r) && (y+r) <= h) { puts("Yes"); } else { puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_340964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_340964/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W, H, x, y, r; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if(x >= r && x+r <= H && y >= r && y + r <= H){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341013/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341013/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w, h, x, y, r; scanf("%d %d %d %d %d", &w, &h, &x, &y, &r); if(x - r >= 0 && x + r <= w && y - r >= 0 && y + r <= h){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341064/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if (x + r > W || x -r < 0 || y + r > H || y - r <0) { printf("No\n"); /* code */ }else { printf("Yes\n"); } /* code */ return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341107/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,r,W,H; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if(x+r<=W && x-r>=0 && y+r<=H && y-r>=0){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341150/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if(0 <= x-r && 0 <= y-r && W >= x+r && H >= y+r){ printf("Yes\n"); } else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341194/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if(x+r>W||x-r<0||y+r>H||y-r<0)printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341266/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W, H, x, y, r; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if(W-r>=x && r<=x && H-r>=y && r<=y){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341316/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341316/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if(x+r<=W&&y+r<=H&&x-r>=0&&y-r>=0){ printf("Yes\n"); } else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341367/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341367/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,h,x,y,r,f; scanf("%d %d %d %d %d",&w,&h,&x,&y,&r); f=0; if(x+r>w)f=1; if(y+r>h)f=1; if(r>x)f=1; if(r>y)f=1; if(f == 0){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341417/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341417/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,h,x,y,r; scanf("%d %d %d %d %d ",&w,&h,&x,&y,&r); if(x-r>=0 && w>=x+r && h>=y+r && y-r>=0){ printf("Yes\n"); } else {printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341460/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341460/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d%d%d%d%d",&W,&H,&x,&y,&r); if(x - r >= 0 && x + r <= W && y - r >= 0 &&y + r <= H){ printf("Yes\n"); }else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341503/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341503/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); if(W<(x+r)||H<(y+r)){ printf("No\n"); }else if((x-r)<0||(y-r)<0) { printf("No\n"); } else{ printf("Yes\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341554/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341554/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d%d%d%d%d",&W,&H,&x,&y,&r); if(x<=0||x>=W){ printf("No\n"); } else if(y<=0||y>=H){ printf("No\n"); } else if(x-r<0||x+r>W){ printf("No\n"); } else if(y-r<0||y+r>H){ printf("No\n"); } else{ printf("Yes\n"); } retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341598/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W = 0; int H = 0; int x = 0; int y = 0; int r = 0; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if (r <= x && r <= y && r <= W - x && r <= H - y) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341648/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W, H, x, y, r; scanf("%d %d %d %d %d\n", &W, &H, &x, &y, &r); printf((0<=x-r && x+r<=W && 0<=y-r && y+r<=H) ? "Yes\n" : "No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d",&W); scanf("%d",&H); scanf("%d",&x); scanf("%d",&y); scanf("%d",&r); if(x-r>=0&&x+r<=W&&y-r>=0&&y+r<=H) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341749/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341749/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d",&W,&H); scanf("%d %d %d",&x,&y,&r); if(W>0&&W<=100&&H>0&&H<=100&&r>0&&r<=100){ if(x>=-100&&x<=100&&y>=-100&&y<=100){ if(W>=x+r&&0<=x-r&&H>=y+r&&0<=y-r) printf("Yes\n"); else printf("No\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341792/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341792/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r,a,b,c,d; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); a=x-r; b=y-r; c=x+r; d=y+r; if(a<0){ puts("No"); } else if(b<0){ puts("No"); } else if(c>W){ puts("No"); } else if(d>H){ puts("No"); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341835/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341835/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d", &W,&H,&x,&y,&r); if(0 <= x-r&&x+r <= W&&0 <= y-r&&y+r <= H) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341879/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341879/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r,f; scanf("%d %d %d %d %d",&W,&H,&x,&y,&r); f=0; if(x+r>W)f=1; if(y+r>H)f=1; if(r>x)f=1; if(r>y)f=1; if(f==0) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341921/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341921/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 w,h,x,y,r; scanf("%d%d%d%d%d", &w, &h, &x, &y, &r); if (0+r <= x && x <= w-r && 0+r <= y && y <= h-r) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_341965/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_341965/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W,H,x,y,r; scanf("%d %d %d %d %d", &W, &H, &x, &y, &r); if((x+r)<=W && (y+r)<=H && x>=r && y>=r) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_342007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_342007/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(int argc, const char * argv[]) { int w, h, x, y, r; scanf("%d %d %d %d %d", &w, &h, &x, &y, &r); if ((x + r) <= w && (y + r) <= h && x >= r && y >= r) { printf("Yes\n"); }else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_342050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_342050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> long long min(long long x,long long y){ if(x<y) return x; else return y; } int main(void){ long long a,b,n; scanf("%lld%lld%lld",&n,&a,&b); printf("%lld",a*(n/(a+b))+min(a,(n%(a+b)))); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145628/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145628/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int a;//青 long int b;//赤 long int n; long int sum; long int ans; scanf("%ld %ld %ld",&n,&a,&b); sum=a+b; if(n%sum>a) { ans=(n/sum)*a+a; } else { ans=(n/sum)*a+n%sum; } printf("%ld\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145671/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145671/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { unsigned long long N, A, B; // input scanf("%llu %llu %llu", &N, &A, &B); unsigned long long set = N / (A + B); unsigned long long blueBall = A * set; unsigned long long mod = N % (A + B); if (mod >= A) { blueBall += A; } else { blu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145714/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145714/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #ifdef TEST struct test { int ans; } td[] = { {}, }; #endif void solver(long long n, long long a, long long b) { long long all = 0; long long num = n / (a + b); all = num * a; if(n - num * (a + b) > a) { all += a; } else { all += (n -...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145765/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> typedef struct { long long key, x, l; } data; void merge_sort(data x[], int n) { static data y[100001] = {}; if (n == 1) return; merge_sort(&(x[0]), n/2); merge_sort(&(x[n/2]), (n+1)/2); int i, p, q; for (i = 0, p = 0, q = n/2; i < n; i++) { if (p >= n/2) y[i] = x[q++]; else if (q >= n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145808/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145808/source.c" target datalayout = "e-m:e-p270: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 { i64, ...
#include <stdio.h> int main() { char s[5]; int n = 0; scanf("%s", s); for (int i = 0; i < 4; i++) { if (s[i] == '+') n++; else n--; } printf("%d\n", n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145859/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145859/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { char s; int sum = 0; for(int i=0; i<5; i++) { scanf("%c", &s); if(s == '+') sum++; else if(s == '-') sum--; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145930/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145930/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; int ans=0; scanf("%s",a); for (int i=0;i<4;i++){ if(a[i]=='+'){ ans++; }else{ ans--; } } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_145981/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_145981/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char s[4]; scanf("%s",s); int i,ans=0; for(i=0;i<4;i++){ if(s[i]=='+')ans++; else ans--; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146030/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146030/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0,i; char s[5]; scanf("%s", &s); for (i = 0;i < 4;i++) { if (s[i] == '+') { n++; } else if (s[i] == '-') { n--; } } printf("%d\n", n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146081/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146081/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 3 int main(){ char s[N]; int ans=0,i; scanf("%s",s); for(i=0; i<=N; i++){ if('+' == s[i])ans++; if('-' == s[i])ans--; } printf("%d\n",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146124/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146124/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<unistd.h> #include<stdlib.h> #include<string.h> int main(){ char c; int i = 0; while((c=getchar())!=EOF){ if(c=='+'){ i=i+1; } else if(c=='-'){ i=i-1; } } printf("%d",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146168/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146168/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#if 0 cat <<EOF >mistaken-paste #endif // thanks for @rsk0315_h4x #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #define _USE_MATH_DEFINES #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #include <time.h> #define BIG 2000000007 #def...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146210/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hwll = type { i64, ...
#include <stdio.h> int getSecondsStandard(int h,int m, int s){ return (120 * 60 -( h * 3600 + m * 60 + s)); } int getSecondsThreeTimes(int h,int m, int s){ return (120 * 60 - (h * 3600 + m * 60 + s)) * 3; } void printTime(int sec){ int h = sec / 3600; int m = sec % 3600 / 60; int s = sec % 60; if(h < 10){putcha...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 one, temp; int n; int i; char str[512]; int score; while (fgets(str, 512, stdin) != NULL){ one = score = temp = i = 0; while (str[i] != '\0'){ temp = 0; while (str[i] != ' ' && str[i] != '\n'){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146348/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146348/source.c" target datalayout = "e-m:e-p270: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(void) { int X,Y,Z; scanf("%d %d %d",&X,&Y,&Z); if((X%(Y+Z)==0)||(X%(Y+Z)<Z)) printf("%d\n",X/(Y+Z)-1); else printf("%d\n",X/(Y+Z)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146449/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146449/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int sobra; int resultado; scanf("%d %d %d",&x,&y,&z); sobra = x%(y+z); if(sobra == z){ resultado = x/(y+z); }else{ resultado = (x/(y+z))-1; } printf("%d\n",resultado); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146492/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146492/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum; scanf("%d%d%d",&x,&y,&z); x-=z; int count=x/(y+z); printf("%d",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146535/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146535/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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> #define BIG 2000000007 #define MOD 1000000007 typedef uint64_t ull; typedef int64_t sll; #define N_MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146586/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146586/source.c" target datalayout = "e-m:e-p270: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.hw = type { i32, i3...
#include<stdio.h> int main() { int x,y,z,i; while(scanf("%d%d%d",&x,&y,&z)!=EOF) { for(i=0;;i++) { if((i*y)+(i+1)*z>x) break; } printf("%d\n",i-1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146629/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146629/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d %d",&x,&y,&z); printf("%d",(x - z) / (y + z)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146672/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146672/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); int i; for(i = 0; (a - 1) * i + 1 < b; ++i){} printf("%d\n", i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146722/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int count = 1; scanf("%d %d", &a, &b); //電源タップと同数必要ならを出力する i = a; if (i == b) { printf("1\n"); return 0; } if (b == a) //電源タップ一つで済む場合 { printf("1\n"); return 0; } else if (b == 1) //電源タップがいらない場合 { printf("0\n"); return 0; } //必要なタップ数をカウントする...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146766/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146766/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s=0,n=0; scanf("%d%d",&a,&b); while(s+1<b){ s+=a-1; n++; } printf("%d",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146809/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146809/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,s; if (scanf("%d", &a) == 1) {} if (scanf("%d", &b) == 1) {} i = 0; for(s = 1;s < b;) { s = (s - 1) + a ; i++; } printf("%d\n",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 plug = 1, count = 0, A, B; scanf("%d %d", &A, &B); for (; plug < B; count++) { plug = plug + A - 1; } printf("%d",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146896/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146896/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> #include <math.h> #define DEBUG int main() { int a, b; //read scanf("%d %d", &a, &b); //solve int ans = 1; int sum = a; while (true) { if(b == 1) { ans = 0; break; } if(s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146946/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int b; int i,j; int kosu=0; int ans=1; scanf("%d%d",&a,&b); kosu=a; while(kosu<b){ kosu=kosu-1+a; ans++; } if(b==1){ ans=0; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_146997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_146997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input_i(x) scanf("%d", &x) #define input_lli(x) scanf("%lld", &x) #define input_s(x) scanf("%s", x) #define BUFSIZE 4 int main(int argc, char const *argv[]) { int A, B, i, outlet= 1, ans= 0; input_i(A); input_i(B); w...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147039/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147039/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,i; while(1){ scanf("%d",&n); if(n==0)break; int a[11]={0},b=0; for(i=0;n!=0;i++){ a[i]=n%8; n/=8; } for(i--;i>-1;i--){ if(a[i]>4)a[i]+=2; else if(a[i]>3)a[i]++; printf("%d",a[i]); } printf("\n"); } return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,n; char str[16]; while(1) { scanf("%d",&n); if(n==0) { break; } sprintf(str,"%o",n); for(i=0;str[i]!='\0';i++) { if(str[i]>='4') { str[i]++; } if(str[i]>='6') { str[i]++; } } printf("%s\n",str); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147154/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char s[100010]; int i,c=0; scanf("%s",s); for(i=1;s[i];i++){ if(s[i]-s[i-1])c++; } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147211/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147211/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100000]={}; int i; scanf("%s",s); int a; a=strlen(s); int ans=0; for(i=1;i<a;i++){ if(s[i]!=s[i-1]){ ans++; } } // printf("%d\n",a); printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147255/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,cnt; char now,str[100001]; scanf("%s",str); now = str[0]; cnt = 0; for (i = 1;i < strlen(str);i++) { if (now != str[i]) { now = str[i]; cnt++; } } printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147299/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#pragma region kyopuro_templates #pragma GCC optimize("Ofast") #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147341/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node_AVL_set = type...
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> // 配列の最大の大きさ #define MAX_LENGTH 200010 typedef struct{ int array[MAX_LENGTH]; int first; int last; }QUEUE; void init(QUEUE*); int enqueue(QUEUE*,int); int dequeue(QUEUE*,int*); struct touple { int a; int b; }; int cmp_touple(co...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147385/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147385/source.c" target datalayout = "e-m:e-p270: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.QUEUE = type { [200...
#include <stdlib.h> #include <stdio.h> int INFTY = 1000000000; int counter = 0; void merge(int A[], int left, int mid, int right){ int n1 = mid - left; int n2 = right - mid; int L[n1]; int R[n2]; for(int i=0; i<n1; i++) L[i] = A[left + i]; for(int i=0; i<n2; i++) R[i] = A[mid + i]; L[n1] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147435/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147435/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @INFTY = dso_local local_un...
#include<stdio.h> #define INFINITY 1000000001 #define N 500000 int count=0; void mergeSort(int *,int,int); void merge(int *,int,int,int); int main(){ int n,k; int A[N]; int left,right; scanf("%d",&n); left=0; right=n; for(k=0;k<n;k++){ scanf("%d",&A[k]); } mergeSort(A,left,right); for(k=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147493/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #include <limits.h> int merge(int *A, int left, int mid, int right){ int i, j, k, c = 0, n1 = mid-left, n2 = right-mid; int L[n1+1], R[n2+1]; for(i = 0; i < n1; i++) L[i] = A[left+i]; L[n1] = INT_MAX; for(i = 0; i < n2; i++) R[i] = A[mid+i]; R[n2] = INT_MAX; i = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147536/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mergeSort.c = internal unn...
#include<stdio.h> #include<stdlib.h> typedef long long int ulli; ulli gcd(ulli a,ulli b){ if(a==0) return b; else return gcd(b,a%b);} int cmp(const void*a,const void*b){ return (*(int*)a-*(int*)b);} int min(int a,int b){ if(a<=b) return a; else return b;} int max(int a,int b){ if(a>=b) return a; el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14758/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14758/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 count=0; void margesort(int *,int,int); void marge(int *,int,int,int); int S[5000000],L[2500001],R[2500001]; int main(){ int n,i; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&S[i]); margesort(S,0,n); for(i=0;i<n-1;i++) printf("%d ",S[i]); printf("%d\n",S[i]); prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147622/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147622/source.c" target datalayout = "e-m:e-p270: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...
#define FOR(i,a,b) for (int i=(a);i<(b);i++) #define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--) #define REP(i,n) for (int i=0;i<(n);i++) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <stdlib.h> #define SENT 1000000000 int merge(int A...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147673/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147673/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MAX 500000 #define INFINITY 2000000000 int cnt; int L[(MAX/2)+2]; int R[(MAX/2)+2]; void merge(int[],int,int,int); void mergeSort(int[],int,int); int main() { int n,A[MAX],i; cnt=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&A[i]); mergeSort(A,0,n); for(i=0;i<n-1;i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147716/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147716/source.c" target datalayout = "e-m:e-p270: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> #define N 500000 #define INFTY 10000000000 int count=0; void merge(int A[],int left,int mid,int right); void mergeSort(int A[],int left,int right); int main() { int A[N]; int n,i; scanf("%d",&n); for(i = 0; i < n; i++){ scanf("%d",&A[i]); } mergeSort(A,0,n); for(i=0;i<n;i++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147767/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147767/source.c" target datalayout = "e-m:e-p270: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 t; scanf("%d",&t); while(t--) { int n,i=0,j=0,k=0; scanf("%d",&n); if(n>3) { i=n-1; for(;i>6;i-=4) { printf("%d %d %d %d ",i,i-2,i+1,i-1); } if(i==6) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14781/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> /* Macro Definition */ #define MAX 500000 /* Prototype Declaration */ void marge(int, int, int); void margeSort(int, int); /* Grobal Variable */ int S[MAX], L[(MAX/2) + 1], R[(MAX/2) + 1], n, count = 0; int main() { int i; scanf("%d", &n); for ( i = 0; i < n; i++ ) scanf("%d", &S[i]); m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147860/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #define INFTY 1000000000 void merge(int [],int, int, int); void mergesort(int [],int,int); int c=0; int main(){ int i; int left; int right; int mid; int n; int *S; scanf("%d ",&n); S=malloc(sizeof(int)*n); for(i=0;i<n;i++){ scanf("%...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147903/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147903/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unname...
#include<stdio.h> int L[300000], R[300000]; int cnt = 0; int merge(int A[], int n, int left, int mid, int right){ int i, j, k; int n1 = mid - left; int n2 = right - mid; int L[500000], R[500000]; for( i = 0; i < n1; i++ ){ L[i] = A[left + i]; } for( i = 0; i < n2; i++ ){ R[i] = A[mid + i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147947/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147947/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #include <memory.h> void put_uint(int n) { if(!n) { putchar_unlocked('0'); return; } char buf[11]; int i = 0; while(n) buf[i++] = (char)(n % 10 + '0'), n /= 10; while(i--)putchar_unlocked(buf[i]); } int get_uint() { int n = 0; int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_147990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_147990/source.c" target datalayout = "e-m:e-p270: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> // #include<math.h> // #define INFTY FP_INFINITE #define INFTY 2147483647 int ct=0; void printer(int *array, int fst, int n){ int i; for(i=fst; i<n; i++){ printf("%d",array[i]); if(i != n-1) printf(" "); else printf("\n"); } } void merge(int *A, int left, int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148032/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148032/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ct = dso_local local_unnam...
#include <stdio.h> #include <stdlib.h> int Merge(int *A, int left,int mid,int right); int Sort(int *A, int left, int right); int main(int argc, char** argv) { int size; scanf("%d",&size); int right = size; int left = 0; int array[size]; for(int i= 0; i<size; i++) { scanf("%d", &arr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148076/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define MAX 500000 void Merge(int [],int,int,int); void Merge_Sort(int [],int,int); int total; int main(void){ int A[MAX]; int i,n; //要素の個数を指定 scanf("%d",&n); //読み込む for(i=0;i<n;i++) scanf("%d",&A[i]); Merge_Sort(A,0,n); //ソートされた数列を表示させる for(i=0;i<...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148119/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148119/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 *candy,a,b,n,t,i; int pos_alice, pos_bob; int minsize,tmp,moves; scanf("%d",&t); while(t--){ scanf("%d",&n); candy=(int *)calloc(n,sizeof(int)); for(i=0;i<n;i++) scanf("%d",&candy[i]); minsize=0; pos_alice=0; pos_bob=n-1; a=b=0; moves=0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_14817/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_14817/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include<stdlib.h> #include<time.h> #include<math.h> #define MAX 500010 #define inf 2000000000 int A[MAX],cnt=0; int l[MAX/2+10],r[MAX/2+10]; void merge(int left,int mid,int right) { int i,Lstart=1,Rstart=1; int n1=mid-left; int n2=right-mid; for(i=1;i<=n1;i++) l[i]=A[left+i-1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148212/source.c" target datalayout = "e-m:e-p270: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> #define N 500000 int L[(N/2)+2],R[(N/2)+2]; int a; void merge(int b[],int l,int m,int r){ int d,i,j,e=m-l,f=r-m; for(i=0;i<e;i++){ L[i]=b[l+i]; } for(i=0;i<f;i++){ R[i]=b[m+i]; } L[e]=1000000000; R[f]=1000000000; i=0; d=0; for(j=l;j<r;j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_148263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_148263/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @L = dso_local local_unname...