Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if(a+b==15) printf("+\n"); else if(a*b==15) printf("*\n"); else printf("x\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_375884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_375884/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <time.h> #define _CRT_SECURE_NO_WARNINGS #define TLong long long // fact(n) int fact(int n){ if(n == 1) return 1; else return (n * fact(n - 1)); } // combination(n,r) int combination(int n, int r){ if(r == 0 || r == n) return 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_375927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_375927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 == 15) printf("+\n"); else if (a*b == 15) printf("*\n"); else printf("x\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_375978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_375978/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,k,d,q,r; scanf("%lld %lld %lld",&x,&k,&d); if(x < 0) x = -x; q = x/d; r = x%d; if(q >= k) printf("%lld\n",x-k*d); else if((k-q)%2 == 1) printf("%lld\n",d-r); else printf("%lld\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376070/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x,k,d,i; scanf("%ld %ld %ld",&x,&k,&d); if (x<0) x=-x; if (d<0) d=-d; i=x/d; if (i<=k) { x-=d*i; k-=i; if (k%2==0) printf("%ld\n",x); else printf("%ld\n",d-x); } else printf("%ld\n",x-k*d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376113/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d\n",(a-1)*(b-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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", &a); scanf("%d", &b); if (a<2 || a>100 || b<2 || b>100) { printf("Invalid input"); return 0; } else { int area= a*b - (a+b-1); printf("%d", area); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376221/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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", &a); scanf("%d", &b); a = a-1; b = b-1; printf("%d", a*b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376265/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376265/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,Square; scanf("%d%d",&A,&B); Square=(A-1)*(B-1); printf("%d",Square); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376308/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376308/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a,b; scanf("%d%d",&a,&b); printf("%d\n",a*b-a-b+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d\n",(a-1)*(b-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376401/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376401/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &a); scanf("%d", &b); printf("%d", (a - 1) * (b - 1)); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376452/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a); scanf("%d",&b); printf("%d\n",a*b-a-b+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdint.h> // uint64_t #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) > (b) ? (b) : (a)) int get_int2(int *a1, int *a2) { scanf("%d %d", a1, a2); return 0; } // <arr[0]> <arr[1]> .. <arr[size-1]> int fget_array(int *arr, int size...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ char str[3][3],s[9]; int i,j,flag=0; while(scanf("%s",s)!=EOF){ for(i=0;i<3;i++){ for(j=0;j<3;j++)str[i][j]=s[j+i*3]; } for(i=0;i<3;i++){ if(str[0][i]=='o' && str[1][i]=='o' && str[2][i]=='o')flag=1; else if(str[0][i]=='x' && str[1][i]=='x' && str[2][i]=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include<stdlib.h> #include <math.h> #include <string.h> void merge(long long int*a,long long int*b,long long int*c,long long int m,long long int n) { long long int i=0,j=0,k=0; while(i<m&&j<n) { if(a[i]>b[j]) c[k++]=b[j++]; else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_37664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_37664/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdlib.h> #include<math.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) void run(void){ int n; scanf("%d",&n); int a[100000]; int i; for(i=0;i<n;i++) scanf("%d",a+i); int c0,c1,c2; c0=c1=c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376683/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(){ int N, a, two_num = 0, four_num = 0, i; scanf("%d", &N); for(i = 0; i < N; i++){ scanf("%d", &a); if(a % 4 == 0){ four_num++; } else if(a % 2 == 0){ two_num++; } } if(2 * four_num + two_num >= N || 2 * four_num + 1 == N){ printf("Yes\n"); } el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s[200000]; int i=0,n,x,y,nop=0; scanf("%d %d %d",&n,&x,&y); c = getchar(); while((c = getchar()) != '\n') { s[i] = c; i++; } for(int j=0;j<x;j++) { if(j < y) { if(s[n-j-1] != '0') { nop++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_37677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_37677/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdlib.h> #define N 2*123456 int isPrime[1+N]; void sieve() { int i, j; for(i = 2; i < N; ++i){ isPrime[i] = 1; } for(i = 2; i < N; ++i){ if( isPrime[i] ){ for(j = 2; i * j < N; ++j){ isPrime[i * j] = 0; } } } } int main(int argc, char *argv...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376849/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @isPrime = dso_local local_...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> //#define min(a, b) a < b ? a : b //#define max(a, b) a > b ? a : b //#define MAXN 100001 int main(void) { long long i; long long N; //int ok; long long sumn = 0, suma = 0, k; scanf("%lld", &N); long long A[N]; long long d[N]; fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376892/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[101],n,i,d,sum,k; while(1){ sum=0; scanf("%d",&n); if(n==0){break;} for(i=0;i<n;i++){ scanf("%d",&a[i]); } for(i=n-1;i>0;i--){ for(k=0;k<i;k++){ if(a[k]>a[k+1]){d=a[k+1]; a[k+1]=a[k]; a[k]=d; sum=sum+1;} } } printf("%d\n",sum); } return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_376942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_376942/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ,n ,tmp ,sort=0 ,numbers[110]; while( scanf( "%d",&n ) != EOF ){ if( n == 0 ){ break; } for( i=0 ; i<n ; i++ ){ scanf( "%d",&numbers[i] ); } for( i=0 ; i<n-1 ; i++ ){ for( j=n-1 ; j>i ; j-- ){ if( numbers[j] < numbers[j-1] ){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int a,b,c,d; while(scanf("%d%d%d",&a,&b,&c)!=-1){ d=0; for(i=1;i<11;i++){ if(i!=a&&i!=b&&i!=c) if(a+b+i<=20) d++; } if(d>3) puts("YES"); else puts("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377071/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdbool.h> struct section{ int low,high; }; int comp(const void *p1,const void *p2); bool check(struct section *sec,int num,int max); int main(void){ int N,W,H; int i,j,k; struct section xsec[100000],ysec[100000]; int x,y,dist; scanf("%d%d%d",&N,&W,&H); fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377114/source.c" target datalayout = "e-m:e-p270: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.section = type { i3...
#include<stdio.h> #define CLASS 9 struct ClassData { char name[16]; int am_visitors; int pm_visitors; int all_visitors; unsigned int income; }; int main(void) { struct ClassData data[CLASS]; int i; for (i = 0; i < CLASS; i++) { scanf("%s %d %d",data[i].name, &data[i].am_visitors,&data[i].pm_visitors); d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377158/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377158/source.c" target datalayout = "e-m:e-p270: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.ClassData = type { ...
#include <stdio.h> int main(void) { int mo,af,i; char class[16]; for (i=0; i<9; i++) { scanf("%s %d %d\n",class,&mo,&af); printf("%s %d %d\n",class,mo+af,mo*200+af*300); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377215/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377215/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b, r; scanf("%d", &X); a = X/500; X = X-(a*500); b = X/5; r = (a*1000) + (b*5); printf("%d\n", r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377259/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377259/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, Max=0; scanf("%d",&x); Max += x / 500 * 1000; Max += x % 500 / 5 * 5; printf("%d",Max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377301/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b, happy; scanf("%d",&x); a = x/500; x -= a*500; b = x/5; happy = a*1000 + b*5; printf("%d",happy); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377345/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a=0,b=0; scanf("%d",&x); a=x/500; x=x%500; b=x/5; printf("%d",a*1000+b*5); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 input; int five_h; int five; scanf("%d", &input); five_h = (input / 500); input = input% 500; five = input / 5; printf("%d\n", (five_h * 1000) + (five * 5)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int ans; scanf("%d", &X); ans = (X / 500) * 1000 + (X % 500 / 5) * 5; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377475/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,happy=0; scanf("%d",&x); happy=happy+(x / 500)*1000; x=x-(x / 500)*500; happy=happy+(x / 5)*5; printf("%d",happy); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377518/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<assert.h> #include<complex.h> #include<ctype.h> #include<errno.h> #include<fenv.h> #include<float.h> #include<inttypes.h> #include<iso646.h> #include<limits.h> #include<locale.h> #include<math.h> #include<setjmp.h> #include<signal.h> #include<stdalign.h> #include<stdarg.h> #include<stdatomic.h> #include<stdbo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377561/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { long long int a,b; scanf("%lli",&a); b=a/500; a=a%500; b=b*1000+(a/5)*5; printf("%lli\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377604/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377604/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(){ long long point = 0; long long n; scanf("%lli",&n); if(n>=500){ int val = n/500; point = val * 1000; int rem = n%500; if(rem>=5){ rem = rem/5; point += rem * 5; } } else{ int val = n/5; point = val * 5; } printf("%lli\n",point); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377648/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, ans = 0; /*int a = 1000000000; int b; int i = 0; int c[8];*/ int y, z; scanf("%ld", &x); y = x / 500; x = x - y * 500; z = x / 5; printf("%ld\n", y * 1000 + z * 5); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377691/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377691/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a; scanf("%ld", &a); long a1=a/500; long rem=a%500; long a2=rem/5; printf("%ld", (a1*1000)+(a2*5)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377734/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377734/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int sat=0; scanf("%d",&x); sat = x/500; sat *=1000; x = x%500; int temp; temp = x/5 ; temp *=5; sat = sat +temp; printf("%d",sat); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377778/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377778/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 X=0; scanf("%lld", &X); ll happy=0; happy += (X/500)*1000; X = X%500; happy += (X/5)*5; printf("%lld", happy); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377820/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377820/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 "time.h" #include "unistd.h" #include "string.h" #include <math.h> int ans; int i=0; int main(int argc, char* argv[]){ long int a=0,b=0,c=0; char s[7]; scanf("%ld",&a); b=a/500; c=a%500; c=c/5; printf("%d",b*1000+c*5); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377864/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377864/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include<stdio.h> int main (void) { long long A=0; int N,i; long long cul,bef; char c; scanf("%d",&N); scanf("%c",&c); scanf("%lld",&bef); scanf("%c",&c); A+=bef; if(N>2){ for(i=1;i<N-1;i++){ scanf("%d",&cul); scanf("%c",&c); if(b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377907/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377907/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#define NDEBUG #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> // for DEBUG {{{ #ifdef NDEBUG #define DEBUG_PRINT(fmt, ...) ((void)0) #else #define DEBUG_PRINT(fmt, ...) fprintf(stderr, fmt, ##__VA_ARGS__) #endif #define ASSERT_RANGE(min,x,max) assert(((x)>=(min)) && (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377950/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377950/source.c" target datalayout = "e-m:e-p270: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 min(int a, int b) { return (a < b) ? a : b; } void MRoy() { int n, b[111]; scanf("%d", &n); for (int i = 0; i < n - 1; i++) scanf("%d", b + i); b[n - 1] = b[n - 2]; int Ans = b[0]; for (int i = 1; i < n; i++) { Ans += min(b[i], b[i - 1]); } printf("%d\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_377994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_377994/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c,long long d){ return ((c<d)?c:d); } int main(){ long long n,sum=0,b[101],i; scanf("%lld",&n); for(i=1;i<=n-1;i++){ scanf("%lld",&b[i]); } b[0]=100001; b[n]=100001; for(i=1;i<=n;i++){ sum+=min(b[i-1],b[i]); } printf("%lld\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378036/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n; scanf("%d",&n); int i; if(n==1 || n==2) printf("1\n1\n" ); if(n==3) printf("2\n1 3\n"); if(n==4) printf("4\n2 4 1 3\n"); if(n>4) { printf("%d\n",n); printf("1"); for(i=3;i<=n;i+=2) printf(" %d",i); for(i=2;i<...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_37813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_37813/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<math.h> #include<stdlib.h> //D日目時点のスコアを計算 int score(int D, int c[], int s[][26], int t[]){ int pen_day[26]; for(int i=0; i<26; i++){ pen_day[i]=1; } int score=0; for(int i=0; i<D; i++){ int type=t[i]-1; pen_day[type]=0; //満足度増加 ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//A - AtCoder Contest Scheduling //Hiia #include <stdio.h> #include <stdlib.h>//rannsuu, zettaichi(absolute) #include <time.h> //srand((unsigned int) time(0)); #include <math.h>//koudona keisann #include <string.h>//hairetsu #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) typedef long long ll; //#de...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 d; //365 int c[26]; int score[9490]; int t[365] = {0}; int day1[26] = {0}; double x = 0.36787944117; int tmp1=-99999,tmp2=-99999; scanf("%d",&d); for(i=0;i<26;i++){ scanf("%d ",&c[i]); } for(i=0;i<d*26;i++){ scanf("%d ",&score[i]); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378274/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 OUTPUT__LENGTH (128) char _out[OUTPUT__LENGTH]; char *_o = _out; void write_uint(int n) { if(!n) { *_o++ = '0'; return; } char buf[11]; int i = 0; while(n) buf[i++] = (n % 10 + '0'), n /= 10; while(i--) *_o++ = buf[i]; } int get_uint() { int n = 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378331/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378331/source.c" target datalayout = "e-m:e-p270: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<string.h> #define MAX 100 int n,c,d=0; int i; int pre[1000],in[1000],post[1000]; int find(int x){ for(i=0; i<n;i++){ if(x==in[i]){return i;} } return 0; } void rec(int l, int r){ int a,b; if(l>=r){return;} a=pre[d++]; b=find(a); rec(l,b); rec(b+1,r); post[c++]=a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @d = dso_local local_unname...
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> int main() { char s1[3], s2[3]; int i, c = 0; scanf("%s %s", s1, s2); for (i = 0; i < 3; i++) { if (s1[i] == s2[i]) { c++; } } printf("%d", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]; char t[4]; scanf("%s", s); scanf("%s", t); int count = 0; for (int i = 0; i < 3; i++) { if (s[i] == t[i]) { count++; } } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ int a=0; char s[4],t[4]; scanf("%s %s",s,t); for(int i=0;i<3;i++){ if(strncmp(&s[i],&t[i],1)==0){ a++; } } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378548/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3]; char t[3]; int ct = 0; scanf("%s", s); scanf("%s", t); for (int k = 0; k < 3; k++) { if (s[k] == t[k]) { ct++; } } printf("%d\n", ct); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378591/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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], T[4]; int count = 0; scanf("%s\n%s", S, T); if (S[0] == T[0]) count++; if (S[1] == T[1]) count++; if (S[2] == T[2]) count++; printf("%d",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378634/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378634/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { static char s[4], t[4]; int cnt; scanf("%s%s", s, t); cnt = 0; if (s[0] == t[0]) cnt++; if (s[1] == t[1]) cnt++; if (s[2] == t[2]) cnt++; printf("%d\n", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378685/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.s = internal global [...
#include <stdio.h> int main (void) { char S[4], T[4]; int i; int a = 0; scanf ("%s", S); scanf ("%s", T); for (i = 0; i < 3; i++) { if (S[i] == T[i]) { a++; } } printf ("%d", a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378728/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378728/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, c; char S[4], T[4]; c = 0; scanf("%s", S); scanf("%s", T); for(i = 0;i < 3;i++) if(S[i] == T[i]) c++; printf("%d\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378779/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[4],t[4]; int ans=0; scanf("%s %s", s, t); for(i=0; i<3; i++){ if(s[i]==t[i]){ ans++; } } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378821/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char op; scanf("%d %c %d",&a,&op,&b); if(op=='+'){ printf("%d",a+b); } else printf("%d",a-b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378865/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378865/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 unused __attribute__((unused)); int A, B; char op; unused = scanf("%d %c %d", &A, &op, &B); if(op=='+') printf("%d", A+B); else printf("%d", A-B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378908/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378908/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum; scanf("%d %c %d",&a,&c,&b); if(c=='+')sum=a+b; if(c=='-')sum=a-b; printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_378959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_378959/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { char a; int b,c; scanf("%d %c %d",&b,&a,&c); if(a=='+') printf("%d",b+c); else printf("%d",b-c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379000/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char x; scanf("%d %c %d",&a,&x,&b); if(x=='+') { printf("%d\n",a+b); } else { printf("%d\n",a-b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char op; scanf("%d %c %d", &a, &op, &b); if (op=='+') printf("%d\n", a+b); else printf("%d\n", a-b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379095/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k[1]; int a,b,c=0; scanf("%d %s %d",&a,k,&b); if(k[0]=='+'){ c=a+b; }else if(k[0]=='-'){ c=a-b; } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379138/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379138/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,x; char b; scanf("%d %c %d",&a,&b,&c); if(b=='-'){ x=a-c; } else{ x=a+c; } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379181/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379181/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char op; scanf("%d %c %d", &a, &op, &b); printf("%d\n", op == '+' ? a + b : a - b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379224/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379224/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,op,b; scanf("%d %c %d",&a,&op,&b); if(op=='+') printf("%d\n",a+b); else printf("%d\n",a-b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379268/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int compare_int(const void *a,const void *b){ return *(int*)a - *(int*)b; } int main(void){ int w[10]; int k[10]; int sum_w,sum_k; int i; for(i = 0;i < 10;i++){ scanf("%d",&w[i]); } for(i = 0;i < 10;i++){ scanf("%d",&k[i]); } qsort(w,10,sizeof(int),compare_int); qso...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379310/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s1, s2, m1, m2, m3; int t; int i; m1 = m2 = 0; for (i = 0; i < 10; i++){ scanf("%d", &t); if (t > m1){ m3 = m2; m2 = m1; m1 = t; } else if (t > m2){ m3 = m2; m2 =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379361/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379361/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10],k[10],wscore,kscore; for(int i=0;i<10;i++){ scanf("%d",&w[i]); } for(int i=0;i<10;i++){ scanf("%d",&k[i]); } for(int i=0;i<10;i++){ for(int j=i+1;j<10;j++){ if(w[i]>w[j]){ int a = w[i]; w[i] = w[j]; w[j] = a; } } } for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379411/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379411/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N; char s[50][100]; int t[50]; char X[100]; int i; scanf("%d", &N); for(i=0;i<N;i++){ scanf("%s %d", s[i], &t[i]); } scanf("%s", X); for(i=0;i<N;i++){ if(strcmp(X,s[i])==0){ break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379455/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379455/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define MAX_PACKET 100000 int num_packet; int num_track; int weight[MAX_PACKET]; bool canAlloc(long capacity); int main(void) { int i; scanf("%d %d", &num_packet, &num_track); int max_weight = 0; long sum_weight = 0; for (i = 0; i < num_packet; i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100000 int n,k; long long T[MAX]; int calculate(long long P) { int i = 0,j; for(j = 0;j < k;j++) { long long s = 0; while(s + T[i] <=P) { s += T[i]; i++; if(i==n)return n; } } return i; } int binary(void) { long long left = 0,mid; long long right = (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379549/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @k = dso_local global i32 0...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void){ int n,c,t1,t2,now; scanf("%d%d%d",&n,&c,&t1); now=0; while(--n){ scanf("%d",&t2); if(t2-t1<=c) now++; else now=0; t1=t2; } printf("%d\n",now+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3796/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include<stdio.h> #define max 100000 typedef long long int llint; int n, k; int w[max]; int check(llint p){ int i = 0; for(int j=1; j<=k; j++){ llint s = 0; while(s + w[i] <= p){ s += w[i]; i++; if (i == n) return n; } } return i; } int mai...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379642/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @k = dso_local global i32 0...
#include<stdio.h> #define MAX 100000 int n,k; long long T[MAX]; int check(long long P){ int i=0; for(int j=0;j<k;j++){ long long s=0; while(s+T[i]<=P){ s+=T[i]; i++; if(i==n)return n; } } return i; } int solve(){ long long left=0; long long right=100000*10000; long long mid; while(right-left>1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379693/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379693/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @k = dso_local global i32 0...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> int main(void){ int N; scanf("%d", &N); char S[N+1]; scanf("%s", S); int x = 0, max = 0; for(int i = 0; i < N; i++){ if(S[i] == 'I'){ x++; }else{ x--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379750/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379750/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <float.h> #define i_cin(X) scanf("%d", &X) #define i_cin2(X,Y) scanf("%d %d",&X,&Y) #define i_cin3(X,Y,Z) scanf("%d %d %d",&X,&Y,&Z) #define l_cin(X) scanf("%ld",&X) #define f_cin(X) scanf("%f",&X) #define l_cin2(X,Y) scanf("%ld %l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379794/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379794/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define MAX(a, b) ((a < b) ? b : a) int main(void) { int N; char S[101]; scanf("%d %s", &N, S); int max = 0; int x = 0; for(int i = 0; i < N; i++) { if(S[i] == 'I') x++; if(S[i] == 'D') x--; max = MAX(max, x); } printf("%d\n", max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379837/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379837/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x, max; char s[101]; scanf("%d", &n); scanf("%s", s); max = 0; x = 0; for (i=0; i<n; i++) { if (s[i] == 'I') { x ++; } else { x --; } if (x > max) { max = x; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 len; char wls[101]; scanf("%d", &len); scanf("%s", wls); int i, max = 0, point = 0; for (i = 0; i < len; i++) { if (wls[i] == 'I')point++; if (wls[i] == 'D')point--; if (point>max)max=point; } printf("%d", max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379945/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379945/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<ctype.h> int main(void) { char ch; while(1){ scanf("%c",&ch); if(ch=='\n'){ printf("\n"); break;} else if(islower(ch)){ printf("%c",toupper(ch)); }else if(isupper(ch)){ printf("%c",tolower(ch)); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_379996/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_379996/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<ctype.h> int main(void){ while(1){ char c; scanf("%c",&c); if(islower((char) c)){ c = toupper((char)c); }else if(isupper((char)c)){ c = tolower((char)c); } printf("%c",c); if(c == '\n')break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380059/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380059/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int a[1000][10000]; int main() { int i,j,row,col,count; for(i=0;i<5;i++) { for(j=0;j<5;j++) { scanf("%d",&a[i][j]); if(a[i][j]) { row=i; col=j; } } } if(row>2) { row-=2; } else { row=2-row; } if(col>2) { col-=2; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_38016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_38016/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 2618: Trip to Kyoto // 2018.1.25 bal4u@uu #include <stdio.h> #define ABS(a) ((a)>=0?(a):-(a)) #define MIN(a,b) ((a)<=(b)?(a):(b)) int x1[10002], y1[10002], x2[10002], y2[10002]; char *msg[2] = { "%d.0\n", "%d.5\n" }; //#define getchar_unlocked() getchar() int in() { int n = 0; int c = getchar_unlocked...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380246/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380246/source.c" target datalayout = "e-m:e-p270: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> int main(){ int x, y; scanf(" %d %d", &x, &y); int z=0; int x1 = abs(x), y1 = abs(y); z += abs(x1-y1); if((x1<=y1 && ((x<0 &&y>0) ||(x>0&&y<0))) || (x1>=y1 && ((x<0 &&y>0) ||(x>0&&y<0))) ||(x==0 && y<0)||(x>0 && y==0)){ z++; } else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380297/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380297/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> char g[50]; void swap(int *x,int *y){ int z; z=*x;*x=*y;*y=z; } char* sign(char *x,char *y,int c){ g[0]='\0'; strcpy(g,"("); if(c<3)strcat(g,x); else strcat(g,y); switch(c%3){ case 0: strcat(g," - "); break; case 1: strcat(g," + "); break; case 2: strcat(g," * "); break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380347/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @g = dso_local global [50 x...
#include<stdio.h> int main(void){ int n,i; scanf("%d",&n); for(i=1;i<n+2;i++){ if(i*i>n){ printf("%d\n",(i-1)*(i-1)); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380390/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<math.h> int main(){ int n; int sq=0; scanf("%d",&n); for(int i=n;i>=0;i--){ sq=sqrt(i); if(sq*sq==i){ printf("%d\n",i); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380433/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380433/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> int main() { long long n,i; while(~scanf("%lld",&n)) { for(i=n; i>0; i--) { if(i*i<=n) break; } printf("%lld\n",i*i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380484/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380484/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <math.h> #include <stdio.h> int main(void) { int a; scanf("%d",&a); a = (int)sqrt(a); printf("%d\n",(int)pow(a, 2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380527/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380527/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sq(int n){ int a; a = (int)sqrt((double)n); if(a*a == n){ return n; }else{ sq(n-1); } } int main(void){ int n; int ans; scanf("%d", &n); ans = sq(n); printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380570/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380570/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// ABC 153-F // 2020.1.26 bal4u #include <stdio.h> #include <stdlib.h> #include <string.h> typedef long long ll; #define gc() getchar_unlocked() int in() { // 非負整数の入力 int n = 0; int c; c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } #define MAX 200005 typedef struct { int X, H; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380620/source.c" target datalayout = "e-m:e-p270: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.T = type { i32, i32...
#include<stdio.h> #include<stdlib.h> int cmp(const void* a,const void* b){ return *(int*)a - *(int*)b; } int main(){ int a,b; scanf("%d %d",&a,&b); int c[a]; for(int i=0; i<a; i++){ scanf("%d",&c[i]); } qsort(c,a,sizeof(int),cmp); int d=c[a-1]-c[0],e; for(int i=0; i<a-b+1; i++){ e=c[i+b-1]-c[i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380664/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int compare_int(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main() { int N,K; scanf("%d %d",&N,&K); int hight[N]; for (int i = 0; i < N; i++) { scanf("%d",&hight[i]); } qsort(hight,N,sizeof(int),compare_int); int min=hight[N-1]; for (i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380707/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380707/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int compare_int(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main() { // int a, b, c, d, X, Y; // double c; long long a, b, c, d, X, Y; int N, K; //char s[101][101]={}; char sv[101]={}; char ss[101]={...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_380772/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_380772/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...