Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void) { int n,a,b; scanf("%d",&n); if(n==1){ printf("Hello World"); } else if(n==2){ scanf("%d",&a); scanf("%d",&b); printf("%d",a+b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 age; scanf("%d",&age); if(age == 1) printf("Hello World"); else if(age == 2){ int a,b; scanf("%d%d",&a,&b); printf("%d",a + b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162094/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ 2731 Shifting a Matrix // 2018.2.11 bal4u #include <stdio.h> #include <ctype.h> #include <string.h> #define SIZE 700 int N; typedef struct { short r, c; } T; T ans[101][101], t0[101][101]; T tbl[SIZE+1][101][101]; char used[SIZE+1]; int top; char s[1002], *p; char *seq(T res[101][101], char *s); // malloc i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162137/source.c" target datalayout = "e-m:e-p270: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 { i16, i16...
// AOJ 1320: City Merger // 2017.12.31 bal4u@uu #include <stdio.h> #include <string.h> #define INF 0x70707070 char *city[15]; int csz[15]; int sz; char name[15][22]; int nsz[15]; char f[15]; int dp[16][16]; int memo[16][65536]; int naiveMatch(char *text, int len, char *pattern, int patlen) { char c; char *tp...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @memo = dso_local local_unn...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define SIZE 100005 #define PI acosl(-1) //3.14159265358979323846264338327950L #define rep(i, N) for (i = 0; i < N; i++) //制御変数iを用いてN回転 #define array(N, t) (t*)calloc(N, sizeof(t)) //t型N要素の1次元配列を動的確保後0クリア(freeを忘れずに) #define zero(a); {int ite...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162238/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162238/source.c" target datalayout = "e-m:e-p270: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 { i32, ...
#include<stdio.h> #include<stdlib.h> #define MALLOC(type, n) (type *)malloc((n)*sizeof(type)) #define HASH(A, W, B) (((W%166667)*(A%166667)+B%166667)%166667) #define TYPELIST unsigned long struct list{ TYPELIST item; struct list *next; }; typedef struct list List; void KillList(List *list){ if(list!=NULL){ Kil...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162289/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162289/source.c" target datalayout = "e-m:e-p270: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.list = type { i64, ...
#define _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807; #define PI 3.14159265358979323846; #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<n;i++) #d...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mod = dso_local local_unna...
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16239/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16239/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.sd = type { i32, i32 ...
#include<stdio.h> int main(){ int w,h; int i,j; while(scanf("%d%d",&w,&h), w!=0&&h!=0){ for(i=0; i<w; i++){ for(j=0; j<h; j++){ if(i==0||i==w-1||j==0||j==h-1)putchar('#'); else putchar('.'); } putchar('\n'); } putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162432/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162432/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h,w,i,j; for(;;){ scanf("%d%d",&h,&w); if(h==0&&w==0){break;} for(i=0;i<h;i++){ if(i==0||i+1==h){ for(j=0;j<w;j++){printf("#");} } else{ for(j=0;j<w;j++){ if(j==0||j+1==w){printf("#");} else{printf(".");} } } printf("\n"); } printf("\n");...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162483/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162483/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main( ) { int height; int width; int i,j; while( 1 ) { scanf("%d %d" ,&height ,&width ); if( height == 0 && width == 0) { break; } for( i = 0; i < height; i++ ) { for( j = 0; j < width; j++ ) { if( i ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162526/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162526/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i, j, m, n; long long int t, t1; t = 0; t1 = 0; scanf("%d %d", &m, &n); for(i=1; i<=n; i++) { for(j=1; j<=n; j++) { if((i*i+j*j)%n==0) { t++; } } } t = t*(m/n)*(m/n); t1=0; for(i=1; i<=(m%n); i++) { for(j=1; j<=n; j++) { if((...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16257/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16257/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int H,W,i,j; while(1){ scanf("%d %d",&H,&W); if((H==0)&(W==0)) break; for(j=0;j<W;j++){ printf("#"); } printf("\n"); for(i=0;i<H-2;i++){ printf("#"); for(j=0;j<W-2;j++){ printf("."); } printf("#"); printf("\n"); } for(j=0;j<W;j++){ printf("#")...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162612/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162612/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c,n,i; scanf("%d %d",&a,&b); while(a!=0&&b!=0){ for(i=0;i<a;i++) { if(i==0||i==a-1){ for(c=0;c<b;c++) printf("#"); } else { printf("#"); for(c=0;c<b-2;c++) { printf("."); } printf("#"); } printf("\n"); } printf("\n"); scanf("%d %...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162670/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162670/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 prime[100000] = {0}; int n; int primeTop = 2; int i; prime[0] = prime[1] = 1; while(primeTop <= sqrt(100000)){ for(i = 1; i < 100000; i++){ if(i * primeTop < 100000){ prime[i * primeTop] = 1; } } prime[primeTop] = 2; for(i = 2; i < 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162728/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162728/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 *argv[]){ int prime_table[60002]; int i,j,n; int under = 0,upper = 0; for(i = 0;i < 60001; ++i){ prime_table[i] = 1; } prime_table[0] = prime_table[1] = 0; for(i = 2;i < 245; ++i){ if(prime_table[i] == 0){continue;} for(j = i;j < 60001; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162786/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 PRIME_MAX 1000000 int getprimes(int list[], int top){ int i, j; int index = 0; char tmp[PRIME_MAX]; for(i=0;i<top;i++) { tmp[i] = 1; } tmp[0] = tmp[1] = 0; for(i=2;i<top;i++) { if(tmp[i] == 1) { /* 素数 */ list[index] = i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m , n , min = 1 , max , flag , num; char str[10]; scanf("%d%d" , &n , &m); max = n; while ( m-- ){ scanf("%s" , &str); scanf("%s" , &str); scanf("%s" , &str); if ( !strcmp( str , "right" ) ){ flag = 1; }else{ flag = 0; } scanf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16288/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <string.h> #define min(x,y) ((x)>=(y))?(y):(x) #define max(x,y) ((x)<=(y))?(y):(x) int dp[110][110][110][110] = {0}; int row[110][110] = {0}; int col[110][110] = {0}; int main() { int d, down, H, i, j, k, l, left, r, right, u, up, W, x, y; char a[110][110]; scanf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162922/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162922/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dp = dso_local local_unnam...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> typedef struct{ long long a; long long b; long long rest; } task_t; task_t task[200010]; int strsort(const void *A, const void *B){ long long R=((task_t*)A)->rest-((task_t*)B)->rest; long long Q=((tas...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_162980/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_162980/source.c" target datalayout = "e-m:e-p270: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.task_t = type { i64...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upll(const vo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163022/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163022/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @b = dso_local global [2000...
#include <stdio.h> int main(){ int i,n,f=0,r=0; scanf("%d",&n); for(i=10;i<1e6;i*=10)if(i==n)f=1; if(f)r=10; else for(;n;n/=10)r+=n%10; printf("%d",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163066/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163066/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> unsigned int N,ans; int main(void) { scanf("%d", &N); // 1桁ずつ取り出して合計する ans = 0; while(N > 10) { ans += (N % 10); N /= 10; } ans += N; printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163109/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163109/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &X); if (X >= 400 && X <= 599) { printf("8"); } else if (X >= 600 && X <= 799) { printf("7"); } else if (X >= 800 && X <= 999) { printf("6"); } else if (X >= 1000 && X <= 1199) { printf("5"); } else if (X >= 1200 && X <= 1399) { printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163152/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163152/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); if(x>=400 && x<=599){ printf("8"); }else if(x>=600 && x<=799){ printf("7"); }else if(x>=800 && x<=999){ printf("6"); }else if(x>=1000 && x<=1199){ printf("5"); }else if(x>=1200 && x<=1399){ p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163196/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163196/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); if(x >= 400 && x < 600){ printf("8\n"); }else if(x < 800){ printf("7\n"); }else if(x < 1000){ printf("6\n"); }else if(x < 1200){ printf("5\n"); }else if(x < 1400){ printf("4\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163239/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163239/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ans; scanf("%d",&x); if ( x <= 599 ){ ans = 8; } else if( x <= 799 ){ ans = 7; } else if( x <= 999 ){ ans = 6; } else if( x <= 1199 ){ ans = 5; } else if( x <= 1399 ){ ans = 4; } else if( x <= 1599 ){ ans = 3; } else if( x <= 1799 ){ ans =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163282/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163282/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // 内部定数 #define D_CARD_MAX 2000 // 最大カード枚数 // 内部変数 - テスト用 #ifdef D_TEST static int siRes; static FILE *szpFpT, *szpFpA; #endif // 実行メイン int fMain( int piTNo // <I> テスト番号 1~ ) { int i; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163325/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163325/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include<stdio.h> int main(){ int N; scanf("%d",&N); int total=0; for (int i=1;i<=N;i++){ total+=i; } printf("%d",total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163376/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163376/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,n=0; scanf("%d",&a); for(i=0;i<=a;i++) { n=n+i; } printf("%d\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int N; int sum = 0; scanf("%d", &N); for(i=1; i<=N; i++){ sum+=i; } printf("%d", sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163462/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163462/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n,a,i; scanf("%d",&n); for(i=1;i<=n;i++) a=a+i; printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, i, total = 0; scanf("%d", &n); for(i = 1; i <= n; i++) { total += i; } printf("%d", total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163549/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n; int ans = 0; scanf("%d", &n); for (int i = 1; i <= n ; i++) { ans += i; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163592/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163592/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d",(x*x+x)/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum=0;; scanf("%d",&n); for(i=1;i<=n;i++) { sum=sum+i; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n; int sum = 0; scanf("%d", &n); for(int i = 1; i <= n ; i++){ sum = sum + i; } printf("%d\n", sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163729/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,candes=0; while(scanf("%d",&N)!=EOF){ candes =0; for(i=1 ; i<=N ; i++){ candes=candes+i; } printf("%d\n",candes); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163837/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163837/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; b = 0; scanf("%d",&a); for (i = 1; i <= a; i++){ b = i + b; } printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163880/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163880/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum=0; scanf("%d",&n); for (i = 1; i <= n; i++) sum += i; printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163923/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163923/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_163967/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_163967/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0,c,i=0,j,p[100],ans=0; scanf("%d%d",&a,&b); for(i=0; i<a; i++) scanf("%d",&p[i]); for (i=0; i<a; i++){ for (j=i+1; j<a; j++){ if (p[i] < p[j]){ c=p[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164009/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164009/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 comp(const void *a, const void *b){ return (*(int*)b) - (*(int*)a); } int main(){ int n, k, v[1003]; scanf("%d%d", &n, &k); for(int i = 0; i < n; ++i) scanf("%d", &v[i]); qsort(v, n, sizeof(int), comp); long long int sum = 0; for(int i = 0; i < k; ++i) sum += v[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164052/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164052/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20180717 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164102/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164102/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> static int cmp(const void *a, const void *b); int main(int argc, char *argv[]) { int i, N, K, t = 0; int l[50]; scanf("%d %d", &N, &K); for ( i = 0; i < N; i++ ){ scanf("%d", &l[i]); } qsort(l, N, sizeof(int), cmp); for ( i = 0; i < K; i++ ){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n, k; int l[50]; int int_sort( const void *a, const void *b ) { if ( *(int *)a > *(int *)b ) return -1; if ( *(int *)a < *(int *)b ) return 1; return 0; } int main(void) { int i, ans; scanf( "%d %d", &n, &k ); for( i=0; i<n; i++ ) { scanf( " %d", &l[i] ); } qs...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); int num=x/100; // printf("%d\n",num); if(x>=num*100&&x<=num*105){ puts("1"); }else{ puts("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164254/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164254/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &X); int c = X / 100; if (100 * c <= X && X <= 105 * c) printf("1\n"); else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164298/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164298/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> #include <float.h> #include <stdlib.h> #include <math.h> int main(void) { long int i, j, k, l, m, n; long int x; scanf("%ld", &x); /* if(x >= 20000) { printf("1\n"); return 0; } */ for(i = 0; i <= (x / 100); i++) { if( (i * 100) > x) { break...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164340/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164340/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> /* define*/ #define Yes(X) puts ( X ? "Yes" : "No") #define YES(X) puts ( X ? "YES" : "NO") #define FOR(i, a, b) for ( i = a, i < b ; i++) #define REP(i, n) for ( i = 0; i < n ; i++) #define DER(i, n) for ( i = 0; n ; i--) #define max(a, b) (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164391/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MOD = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(){ int n,i,a,b,m,h,w,k; scanf("%d %d %d",&n,&a,&b); int p[n]; m=0; h=0; w=0; for(i=0;i<n;i++){ scanf("%d",&p[i]); if(p[i]<=a) m=m+1; else if(p[i]>b) w=w+1; else h=h+1; } if(m<=h && m<=w) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164434/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164434/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_int(void) { int num; scanf("%d", &num); return num; } // <arr[0]> <arr[1]> .. <arr[size-1]> int fget_array(int *arr, int size) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164478/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164478/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> /* 自然数 a > b を確認・入替 */ long gcd(long a, long b){ long tmp,r; if(a<b){ tmp = a; a = b; b = tmp; } /* ユークリッドの互除法 */ r = a % b; while(r!=0){ a = b; b = r; r = a % b; } return b; } int main(){ int i,j,k; int N; scanf("%d",&N); long A[N]; long m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164520/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 getgcd(int n, int m){ int r; if (n > m) { int t = m; m = n; n = t; } while ((r = m % n) != 0) { m = n; n = r; } return n; } int main(void){ int n, i, max; scanf("%d",&n); int a[n+1], gcd1[n+1], gcd2[n+1], gcd3[n+1]; for(i=0;i<n;i++){ scanf("%d",&a[i]); } int add = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164564/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * FileName: bit_operation_1 * CreatedDate: 2020-07-25 14:46:11 +0900 * LastModified: 2020-07-25 14:52:02 +0900 */ #include <stdio.h> void bit_operation(long int a, long int b, int order){ long int s; if(order == 0){ s = a&b; } else if(order == 1){ s = a|b; } else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164607/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164607/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.2 = private unnamed_a...
#include <stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> int main() { int n; scanf("%d ",&n); int a[n],b[n]; int i; for(i=0;i<=n-1;i++)scanf("%d %d",&a[i],&b[i]); long long int ans=0; for(i=n-1;i>=0;i--){ if((a[i]+ans)%b[i]!=0)ans+=b[i]-(a[i]+ans)%b[i]; } p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164665/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164665/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SIZE 4 int board[SIZE][SIZE]; const int goal[SIZE][SIZE] = {{1,2,3,4},{5,6,7,8},{9,10,11,12},{13,14,15,0}}; void read_board() { for (int i = 0; i < SIZE; i++) for (int j = 0; j < SIZE; j++) scanf("%d", &board[i][j]); } void print() { for (int i = 0; i < SIZE; i++) { for ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164708/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @goal = dso_local local_unn...
#include <stdio.h> #include <math.h> #include <stdlib.h> #define size 4 #define size2 16 #define size3 10000000 #define max 46 typedef struct { int b[size][size],m,cost, space[2], dis; } Pz; //int head=0, tail=0; int h=0; Pz q[size3]; /* void enq(Pz pz){ q[tail]=pz; tail = (tail+1)%size3; } Pz deq(void){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164751/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164751/source.c" target datalayout = "e-m:e-p270: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.Pz = type { [4 x [4...
// AOJ 2200: Mr. Rito Post Office // 2017.12.9 #include <stdio.h> #include <string.h> int land[202][202], sea[202][202]; int dp[1002][202]; int z[1002]; char buf[4000], *p; int getint() { int n = 0; while (*p >= '0') n = (n<<3) + (n<<1) + (*p++ & 0xf); p++; return n; } int main() { int n, m, r, x, y, i, j, k, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164801/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164801/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @p = dso_local local_unname...
#include <stdio.h> int main(void) { int lon,hor,dia; int rec = 0,seb = 0; while(scanf("%d,%d,%d", &lon, &hor, &dia) != EOF){ if(lon*lon + hor*hor == dia*dia)rec++; if(lon == hor)seb++; } printf("%d\n%d\n", rec, seb); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 hen1 = 0, hen2 = 0, x = 0; int ccount = 0 , hcount = 0; while(scanf("%d,%d,%d",&hen1, &hen2, &x) != EOF) { if(hen1 == hen2) { hcount++; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164896/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164896/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x1,x2,x3; int c=0,h=0; while(scanf("%d,%d,%d",&x1,&x2,&x3)!=EOF){ if(x1*x1+x2*x2==x3*x3) c++; if(x1==x2) h++; } printf("%d\n%d\n",c,h); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_164975/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_164975/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,lec=0,loz=0; for(;;){ if(scanf("%d,%d,%d",&a,&b,&c) == EOF){break;} if(a*a+b*b == c*c){lec++;} else if(a == b){loz++;} } printf("%d\n%d\n",lec,loz); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165024/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165024/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 return_min(int a,int b){ if(a>b)return b; else return a; } int return_max(int a,int b){ if(a>b)return a; else return b; } int main(void) { int h,w,n; scanf("%d %d %d",&h,&w,&n); int min=return_min(h,w); int max=return_max(h,w); int count=0; while(n>0){ n-=max; min--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165068/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165068/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int n,m; scanf("%d",&n); scanf("%d",&m); int t; scanf("%d",&t); int i; if(n>m) i=n; else i=m; if(t%i==0) printf("%d",t/i); else printf("%d",t/i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int w,h,n; scanf("%d",&h); scanf("%d",&w); scanf("%d",&n); int x; if(h>=w) x=h; else x=w; int c; if(n%x==0) c=n/x; else c=n/x+1; printf("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165154/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int h,w; int n; scanf("%d %d %d",&h,&w,&n); if(h>w){ if(n%h==0)printf("%d\n",n/h); else printf("%d\n",n/h+1); } else{ if(n%w==0)printf("%d\n",n/w); else printf("%d\n",n/w+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165198/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { double max=0,a,min=10000; while(scanf("%lf",&a)!=EOF){ if(max<a) max=a; if(min>a) min=a; } printf("%lf\n",max-min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165240/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ double x,m,n; scanf("%lf",&x); m=x; n=x; while(scanf("%lf",&x)!=EOF){ if(x>m)m=x; if(n>x)n=x; } printf("%lf\n",m-n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count=0; float data[10000],high,low; while(1){ scanf("%f",&data[count]); if(feof(stdin))break; count++; } high=data[0]; for(i=0;i<count;i++){ if(high<data[i]){ high=data[i]; } } low=data[0]; for(i=0;i<count;i++){ if(low>data[i]){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165334/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165334/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ double a,b[10000],tmp; int n=0,i,j; while(scanf("%lf",&a)!=EOF){ b[n]=a; n++; } for(j=0;j<n-1;j++){ for(i=n-1;i>j;i--){ if(b[i]>b[i-1]){ tmp=b[i]; b[i]=b[i-1]; b[i-1]=tmp; } } } printf("%.2f\n",b[0]-b[n-1]); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165378/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #pragma warning(disable : 4996) int main() { int H, W; int i, j, k, l; char s[100][60]; char a[100][60] = {""}; int count = 0; scanf("%d %d", &H, &W); for (i = 0; i < H; i++) { scanf("%s", s[i]); } for (i = 0; i <= H; i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165428/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165428/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { const int x[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int y[8] = {0, 1, 0, -1, 1, 1, -1, -1}; int H, W, i, j, k; scanf("%d %d", &H, &W); char squares[H + 1][W + 1]; for (i = 0; i < H; ++i) scanf("%s", squares[i]); for (i = 0; i < H; ++i) { for (j = 0; j < W; ++j) { if (squar...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165479/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165479/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) char s[99][99]; int main(){ int h,w; scanf("%d%d",&h,&w); rep(i,0,h)scanf("%s",s[i+10]+10); rep(i,0+10,h+10){ rep(j,0+10,w+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165521/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165521/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int h, w; scanf("%d %d", &h, &w); char foo[51][51]; for (int i = 0; i < h; ++i) { scanf("%s", foo[i]); } for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { if (foo[i][j] == '#') { putchar('#'); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165565/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165565/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h, w; scanf("%d %d\n", &h, &w); char **s; s = (char **)malloc(sizeof(char *) * h); for (int i = 0; i < h; ++i) { s[i] = (char *)malloc(sizeof(char) * w); for (int j = 0; j < w; ++j) { s[i][j] = getchar(); } getchar(); } fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165608/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165608/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d); if(b <= c || a >= b || a >= d){ printf("0\n"); }else if(b >= c && b <= d && a <= c){ printf("%d\n", b - c); }else if(b >= d && a <= c){ printf("%d\n", d - c); }else if(a >= ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165651/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int num[2][2]; // // A B // C D scanf("%d%d%d%d", &num[0][0], &num[1][0], &num[0][1], &num[1][1]); int ans[2]; if (num[0][0] > num[0][1]) { ans[0] = num[0][0]; } else { ans[0] = num[0][1]; } if (num[1][0] < num[1][1]) { ans[1] = num[1][0];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165701/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a, b, c, d; scanf("%d%d%d%d", &a, &b, &c, &d); if (c >= b) { printf("0\n"); } else if (a >= d) { printf("0\n"); } else if (c >= a && d >= b) { printf("%d\n", b - c); } else if (a >= c && b >= d) { printf("%d\n", d - a); } else if (c >= a && b >= d) { printf("%d\n",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d,common; while(~scanf("%d %d %d %d",&a,&b,&c,&d)){ if(a>=d || c>=b || a==b || c==d) common=0; else {if (c>=a && d<=b) common=d-c; else if (c>=a && b<d) common=b-c; else if (c<a && b<=d) common=b-a; else...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165796/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165796/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdbool.h> #include<math.h> #define INFINI 100000001 int main(){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); int maxmin=(a<c)?c:a; int minmax=(b<d)?b:d; if(maxmin>minmax) printf("0"); else printf("%d",minma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165839/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b,c,i,t,j,d,e; while(scanf("%d%d%d%d",&a,&b,&c,&d)!=EOF) { if(b<=c||a>=d) { e=0; } else { i=a<c?a:c; j=a+c-i; t=d<b?d:b; e=t-j; } printf("%d\n",e); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> static int a, b, c, d, arr[101], i, sum; int main(void) { scanf("%d%d%d%d", &a, &b, &c, &d); for (i = a; i < b; ++i) ++arr[i]; for (i = c; i < d; ++i) ++arr[i]; for (i = 0; i <= 100; ++i) if (arr[i] == 2) ++sum; printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165925/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165925/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <stdlib.h> #include <stdbool.h> #define MOD 1000000007 #define END printf("\n");return 0; #define QS09(how_data,data) qsort(data,how_data,sizeof(long),(int (*)(const void *,const void *))qsort_09); #define QS90(how_data,data) qsort(da...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165969/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165969/source.c" target datalayout = "e-m:e-p270: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.wdg = type { i64, i...
#include<stdio.h> int main(){ int n; int i; double money = 100000.0; double a; scanf("%d", &n); for (i = 1; i <= n; i++){ money = money*1.05; a = (int)money % 1000; if (a != 0){ money += 1000; money -= a; } } printf("%d\n", (int)money); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n; long int total = 100000; scanf("%d", &n); for (; n > 0; n--){ total *= 1.05; if( (total % 1000) > 0) total = (total / 1000 + 1) * 1000; } printf("%ld\n", total); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166076/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int n, i, j; double sum; sum=100000.0; scanf("%d", &n); for(i=0;i<n;i++) { sum*=1.05; for(j=0;;j++){ if(sum<=1000*j) break; } sum=1000*j; } printf("%d\n", (int)sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166126/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166126/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int i; int t,t1; int count = 0; int count1 = 0; int count2 = 0; scanf("%d%d",&a,&b); for(i = 1; i <=6;i++){ t = a -i; t1= b - i; if(t<0){ t = -1*t; } if(t1< 0){ t1= -1*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16617/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int mon,n; int i; mon = 100000; scanf("%d",&n); for(i = 1;i <= n;i++){ mon *= 1.05; if(mon % 1000 != 0){ mon = mon - (mon % 1000) + 1000; } } printf("%d\n",mon); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166212/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 interest(int a){ a*=1.05; if(a % 1000 != 0){ a-=a%1000; a+=1000; } return a; } int main(void){ int n,debt; int i; debt=100000; scanf("%d",&n); for(i=0;i<n;i++){ debt = interest(debt); } printf("%d\n",debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166263/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=100000,n; scanf("%d",&n); for(;n>0; n--){ a += a * 0.05; if (a % 1000 != 0) { a -= a % 1000; a += 1000; } } printf("%d\n", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166313/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166313/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n; unsigned long long money = 100000, money_; scanf("%d\n",&n); for(i = 0;i < n;i++){ money += (unsigned long long)(money * 0.05); money_ = money / 1000; if(money_ * 1000 != money){ money = (money_ + 1) * 1000; } } printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include <string.h> #include<math.h> int main(){ int n,i,a=100000; scanf("%d",&n); for(i=0;i<n;i++){ a=a*1.05; if(a%1000!=0){ a=((a/1000)*1000)+1000; } } printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166421/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166421/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ans=100000; int n; int i; scanf("%d",&n); for(i=0;i<n;i++){ ans=ans*0.05+ans; ans+=999; ans/=1000; ans*=1000; } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166472/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int N; int V=100000; scanf("%d",&N); for(;N>=1;N--){ V+=V*0.05; if(V%1000) V=V-V%1000+1000; } printf("%d\n",V); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166515/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 weeks; int result = 100000; scanf("%d", &weeks); for(int i=0;i<weeks;i++) { result=result*105/100; if (result%1000!=0) { result=(result/1000+1)*1000; } } printf("%d\n", result); return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166559/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166559/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(void) { char a[50][101]; int n = 0,i,j,str_length,flag=0,count=0; while (scanf("%s",a[n]) != EOF) { n++; } for(i=0; i<n; i++){ str_length = strlen(a[i]); if(str_length == 1){ count++; }else{ for(j=0; j<(str_length/2); j++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166616/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166616/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 main (void) { int t; scanf("%d", &t); int n, k, answer; while (t--) { scanf("%d %d", &n, &k); int f, s, i; for (i=1 ; i<=k ; i++) { scanf ("%d", &f); if (i==1) answer = f; if (i==k) { if (answer<(n-f+1)) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); int a[n],b[n]; for(int i=0;i<n;i++) { scanf("%d%d",&a[i],&b[i]); } int c=1; for(int i=0;i<n;i++) { if(b[i]<c) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16671/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16671/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(){ int n; scanf("%d", &n); printf("%d", n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166753/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166753/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...