Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<math.h> #define ll long long long long min(long long a, long long b){ if(a < b) return a; else return b; } long long max(long long a, long long b){ if(a < b) return b; else return a; } int main(){ int n,k; scanf("%d",&n); char s[1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217076/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t[99]; double s[99],v; int p=0,f,c; while(1){ c=scanf("%[^ \n]",t); if(c==-1) return 0; if(c==0) return 1; f=0; if(t[1]==0) { if(t[0]=='+') s[p-2]+=s[p-1],p--; else if(t[0]=='-') s[p-2]-=s[p-1],p--; else if(t[0]=='*') s[p-2]*=s[p-1],p--; els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217133/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217133/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct range{ int l,r; } range; int cmp(const void *a,const void *b){ range *p=(range *)a; range *q=(range *)b; return (p->r-p->l)-(q->r-q->l); } void add(int *bit,int x,int v){ int n=bit[0]; for(int i=x;i<=n;i+=i&-i) bit[i]+=v; } int sum(int *bit,int x){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217212/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217212/source.c" target datalayout = "e-m:e-p270: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.range = type { i32,...
#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++ ){ for ( j = 0; j < W; j++ ){ if( ( i + j ) %2 == 0){ printf("#"); } else { printf("."); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217320/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217320/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i, j; while(1){ //数値を2つ入力 scanf("%d %d", &H, &W); //2つの数値が0なら終了 if(H == 0 && W == 0){ break; } //チェック柄の四角形を出力 for(i = 0; i < H; i++){ for(j = 0; j < W; j++){ if((i % 2) == 0){ if((j % 2) == 0 && j == (W - 1)){ printf("#\n"); }else if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while(1){ scanf("%d %d", &H, &W); if(H == 0 && W == 0){ break; } for(i=1 ; i <= H ; i++){ for(j=1 ; j <= W ; j++){ if(i % 2 == 0){ if(j % 2 == 0){ printf("#"); } else{ printf("."); } } else{ if(j % 2 == 0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217407/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217407/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int W,H; int i,j; while(1){ scanf("%d %d", &H, &W); if(H == 0 && W == 0){ break; } for(i =0;i<H;i++){ for(j=0;j<W;j++){ if((i + j) % 2 == 0){ printf("#"); } else{ printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217450/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i, j; while (1) { scanf("%d %d", &H, &W); if (H == 0 && W == 0) { break; } for (i = 0; i < H; i++) { for (j = 0; j < W; j++) { if ((i + j) % 2 == 0) { printf("#"); } else { printf("."); } } printf("\n"); } printf("\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217500/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,b; while(1){ scanf("%d %d",&H,&W); if(H==0&&W==0){ break; } for(a=1;a<=H/2;a++){ for(b=1;b<=W/2;b++){ printf("#."); } if(W%2==0){ printf("\n"); } else{ printf("#\n"); } for(b=1;b<=W/2;b++){ printf(".#"); } if(W%2==0){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217544/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217544/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, H_Cou, W_Cou; while(1) { scanf( "%d %d", &H, &W ); if( H == 0 && W == 0 ) { break; } else { for( H_Cou = 0; H_Cou < H; H_Cou++ ) { if( H_Cou % 2 == 0 ) { for( W_Cou = 0; W_Cou < W; W_Cou++ ) { if( W_Cou % 2 == 0 ) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217588/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217588/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h,w,i,j; while(scanf("%d %d",&h,&w)!=EOF){; if(h==0 && w==0) break; for(i=0;i<h;i++){ for(j=0;j<w;j++) printf("%c",(i+j)%2==0 ? '#' : '.'); printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217638/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217638/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0) break; for(i=0;i<H;i++){ if(i%2==0){ for(j=0;j<W;j++){ if(j%2==0){ printf("#"); }else{ printf("."); } } printf("\n"); }else{ for(j=0;j<W;j++){ if(j%2==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217825/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0)return 0; for(i=1 ; i<=H ; i++){ for(j=1 ; j<=W ; j++){ if((i+j)%2==0)printf("#"); else printf("."); } printf("\n"); } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b, H, W; while(1){ scanf("%d %d",&H, &W); if( H==0 && W==0) break; for(a=1; a<=H; a++){ for(b=1; b<=W; b++){ if((a+b)%2 == 0) printf("#"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217933/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[]) { // insert code here... int w,h; while(1){ scanf("%d %d",&w,&h); if(w==0&&h==0){ break; } for(int y=1;y<=w;y++){ for(int x=1;x<=h;x++){ // if(x==1 && y==1){ // ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217977/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217977/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; while(scanf("%d%d", &h, &w) && h && w){ for(i = 0;i < h;i++){ for(j = 0;j < w;j++) putchar((i + j) % 2 == 0 ? '#' : '.'); puts(""); } puts(""); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218019/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218019/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int i, j; while(1){ scanf("%d %d ", &h, &w); if(h==0&&w==0)break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ if((i%2==0&&j%2==0)||(i%2==1&&j%2==1)){ printf("#"); }else{ printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218062/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218062/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j,sq; while(1){ scanf("%d %d",&h,&w); if(h == 0 && w == 0) break; for(i=0;i < h;i++){ for(j=0;j < w;j++){ if(i % 2 == 0 && j % 2 == 0 || i % 2 == 1 && j % 2 == 1){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218112/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h,w,i,j; while(1){ scanf("%d %d",&h,&w); if(h==0&&w==0){ break; } for(i=0;i<h;i++){ for(j=0;j<w;j++){ if((j+i)%2==0){ printf("#"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218156/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218156/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,a,b,c; for(c=1;;) { scanf("%d %d",&a,&b); if(a==0 && b==0)break; for(j=1;j<=a;j++) if(j%2==0) { for(i=1;i<=b;i++) { if(i%2==0) printf("#"); else printf("."); } printf("\n"); } else { for(i=1;i<=b;i++) { if(i%2==0) prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218213/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> void write(int, int); int main() { int H, W; while(1) { scanf("%d%d", &H, &W); if (H == 0 && W == 0) break; write(H, W); } return 0; } void write(int H, int W) { int i, j; for (i = 0; i < H; i++) { for (j = 0; j < W; j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218394/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[1000], b[1000],x,c,d,e,f; int i = 0; int r = 1; while (r) { scanf("%d %d",&a[i],&b[i]); if(a[i] == 0 && b[i] == 0) { r = 0; } i++; } for (x = 0; x < i; x++) { c = a[x]; d = b[x]; for (e = 0; e < a[x]; e++) { for (f = 0; f < b[x]; f++) { if (e%2==0 &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218437/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SHARP 0 #define DOT 1 int main(void) { int h,w; int i,j; char flag; while(1) { scanf("%d %d",&h,&w); if(h==0&&w==0) break; for(i=1;i<=h;i++) { if(i%2==1) { flag = SHARP; } else { flag = DOT; } for(j=1;j<=w;j++) { if(flag == SHARP)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218523/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218523/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ long long int A, B, K; scanf("%lld %lld %lld", &A, &B, &K); A-=K; K=(A>=0LL)?0LL:-A; if(K>0LL) A=0LL; B-=K; K=(B>=0LL)?0LL:-B; if(K>0LL) B=0LL; printf("%lld %lld\n", A, B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218574/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218574/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int main() { long long int a,b,k,i; scanf("%lld %lld %lld",&a,&b,&k); if(k<=a) { printf("%lld %lld\n",a-k,b); } else if(k>a && k<a+b ) { printf("0 %lld\n",a+b-k); } else if(k>=a+b) { printf("0 0\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218624/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218624/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define BUF_SIZE 50 int get_int3(uint64_t *a1, uint64_t *a2, uint64_t *a3) { #ifdef BUF_SIZE char line[BUF_SIZE]; if(!fgets(line, BUF_SIZE, stdin)) return -1; sscanf(line, "%llu %llu %llu", a1, a2, a3); #else #error #endif return 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218668/source.c" target datalayout = "e-m:e-p270: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() { long long A; long long B; long long K; long long J; scanf("%lld%lld%lld",&A,&B,&K); if(A==K){ printf("%lld %lld",A=0,B); } else if(A+B==K){ printf("%lld %lld",A=0,B=0); } else if(A+B<K){ printf("%lld %lld",A=0,B=0); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218718/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { long long a, b, k; scanf("%lld%lld%lld", &a, &b, &k); if (a >= k) printf("%lld %lld\n", a - k, b); else if (b >= k - a) printf("0 %lld\n", b - (k - a)); else printf("0 0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218761/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218761/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { long a, b, sum; long k; scanf("%lu %lu %lu", &a, &b, &k); if(a < k) { sum = a + b - k; if(sum < 0) { a = 0; b = 0; } else if(sum > b) { a = sum - b; } else { a = 0; b = sum; } } else { a -= k; } printf("%lu %lu\n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218804/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218804/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include<stdbool.h> #include<assert.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #defin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218848/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. ***********************************************...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218899/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218899/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int count(long long int a, long long int b, long long int n) { long long int res = 0; if (a == b && a <= n)res++; long long int max, min; max = min = 10 * a + b; while (max <= n) { res += (max - min + 10) / 10; max = (max - b + 9) * 10 + b; min = (min - b) * 10 + b; } while (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218941/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218941/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<math.h> #define RAND(min,max) (rand()%(max-min+1)+min) #define LOG(log) {printf("%d\n",log);} #define DEBUG(void) {printf("\nDEBUG %d\n",num_debug);num_debug++;} char num_debug = 0; int main(void) { srand((unsigned)time(NULL)); int x; int n; int angl...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218985/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @num_debug = dso_local loca...
#include<stdio.h> #include<string.h> #define STD 200 #define STATE_MAX 3000 /* max state = 6*0 + 6*1 + 6*2 + .... 6*30 < 3000*/ #define DIR 6 int objects[STD][STD], queue[STATE_MAX], visited[STD][STD], dir_x[DIR] = {1, 0, -1, -1, 0, 1}, dir_y[DIR] = {0, -1, -1, 0, 1, 1}; int top, bottom; void put(int val) { queue...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219027/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dir_x = dso_local local_un...
#include <stdio.h> #include <string.h> #define rep(i,n) for(int i=0; i<(int)(n); i++) int main(){ int n; scanf("%d",&n); char s[105],t[105]; scanf("%s%s",s,t); int ans=2*n; rep(i,n+1){ if(i==0)continue; char st[105]={0},tt[105]={0}; strncpy(st,s+n-i,i); strncpy(tt,t,i); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219070/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <math.h> int N; char s[101], t[101]; int is_same_(int d){ for (int i = 0; i < N - d; i++){ if(s[i+d]!=t[i]){ return 0; } } return 1; } void core(){ scanf("%d", &N); scanf("%s", &s); scanf("%s", &t); int d = 0; for (d = 0; d < N; d++){ if (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219120/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219120/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @N = dso_local global i32 0...
#include <stdio.h> #include <string.h> int main() { char s[500001]; scanf("%s",s); long long l=strlen(s); long long left=0,right=0; long long a[l+2]; for(int i=0;i<l+2;i++){a[i]=0;} for(int i=0;i<l;i++){ if(s[i]=='<'){ a[i]=left; left++; }else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> long long MIN(long long a,long long b){return a<b?a:b;} long long R=1,C=1,H[2000010],N[2000010]; //評価関数(いまはMIN) int hyouka(int a,int b){ if(C<b)return 1; if(C<a||b==0)return 0; return N[H[a]]<N[H[b]]?1:0; } //挿入関数 void hin(long long a){ int i=C++; for(N[H[0]=R]=a;hyouka(0,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219214/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @R = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <math.h> #include <limits.h> #include <assert.h> #define FOR(i,a,n) for(i=(a);i<(n);i++) #define swap(type,a,b) do{type t=a;a=b;b=t;}while(0) #define MAX(a,b) (((a)>(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) #define ll long lo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void){ int i, N, M, P; while(1){ scanf("%d %d %d", &N, &M, &P); if(N == 0){ break; } int *X = (int *)malloc(N * sizeof(int)); double sum = 0; for(i = 0; i < N; i++){ scanf("%d", &X[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219322/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,n,p,r,ans,sum=0; int x[1001]; for(;;){ scanf("%d %d %d", &n, &m, &p); if(n==0&&m==0&&p==0) break; for(i=0;i<n;i++){ scanf("%d", &x[i]); sum=sum+x[i]; } r=sum*(100-p); if(x[m-1]!=0){ ans=r/x[m-1]; } else if(x[m-1]==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219373/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int a; int b; scanf("%d",&N); a=N%10; b=N/100; if(a==b){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219416/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #define PI 3.14159265; double alan(double d1){ double alan; alan=(d1/2)*(d1/2)*PI; return alan; } int main(){ double alan1,dusurme,d,h,v,e; scanf("%lf%lf%lf%lf",&d,&h,&v,&e); alan1=alan(d); dusurme=v/alan1; dusurme-=e; if(dusurme<=0) printf("NO"); else{ printf("YES\n"); printf("%lf",h/...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21946/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main() { char N[1500] = {}; scanf("%s", N); // scanf("%d %d",&n,&m); if(N[0]==N[2])printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219502/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; scanf("%s",s); printf("%s\n",(s[0]==s[2])?"Yes":"No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219546/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219546/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,N; scanf("%d",&N); 100<=N<=999; a=N/100; b=N%10; if(a==b) printf("Yes\n"); else printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219597/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a=0; int b,c; scanf("%d",&a); b=a/100; c=a/10; a=a-c*10; if(a==b){ printf("Yes"); }else{ printf("No"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219661/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n,m,a; double s,p,sp,max=0,e=0.0000001; scanf("%d",&n); while(n--){ scanf("%*d %d",&m); for(s=sp=0;m--;s+=a*p){ scanf("%d %lf",&a,&p); sp+=p; } if(max+e<s/sp)max=s/sp; } scanf("%*d %d",&m); for(s=sp=0;m--;s+=a*p){ scanf("%d %lf",&a,&p); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219704/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a; int b; int m; int xm[100000]; int ym[100000]; int cm[100000]; int ai[100000]; int bi[100000]; int x=100000; int y=100000; scanf("%d %d %d",&a,&b,&m); for(int i=0; i<a; i++){ scanf("%d",&ai[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219755/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219755/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(int a, int b) { if(a>b) return b; else return a; } int main() { int A, B, M; scanf("%d %d %d", &A, &B, &M); int a[A], b[B]; for(int i=0;i<A;i++) scanf("%d", &a[i]); for(int i=0;i<B;i++) scanf("%d", &b[i]); int x[M], y[M], c[M]; for(int i=0;i<M;i++) scanf("%d %d %d", &x[i], &y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219799/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219799/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(void) { int k, x; scanf("%d %d",&k,&x); int i = -1000000; int c = 1; while (i <= 1000000) { if(i>= x - k + 1 && i <= x + k -1) { if (k*2 - 1 == c) printf("%d\n",i); else printf("%d ",i); c++; } i++; } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219841/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219841/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int k,x,i; scanf("%d%d",&k,&x); printf("%d",x-k+1); for(i=2-k;i<k;i++) printf(" %d",x+i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219885/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int K; int X; scanf("%d", &K); scanf("%d", &X); for(int i = X - (K - 1); i <= X + (K - 1); i++)printf("%d ", i); putchar('\n'); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219928/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int k,x,i; scanf("%d%d",&k,&x); for(i=k-1;i>=0;i--)printf("%d ",x-i); for(i=1;i<k;i++)printf("%d ",x+i); puts(""); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219971/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219971/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int k,x,i,j; scanf("%d %d",&k,&x); for(i=0;i<2*k-1;i++){ printf("%d ",x-k+1+i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220012/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,K,X; scanf("%d", &K); scanf("%d", &X); if(K==1){ printf("%d ",X); } else{ for(i=K-1;i>=1;i--){ printf("%d ",X-i); } printf("%d ",X); for(i=1;i<K;i++){ printf("%d ",X+i); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220056/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int pow2(int pow){ long int base = 1; for(int i = 0; i < pow; i++) base = base*2; return base; } int main() { int t; int n; long int diff; scanf("%d",&t); for(int i = 0; i < t; i++){ scanf("%d",&n); diff = 2*pow2(n/2) -2; printf("%ld\n", diff); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2201/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2201/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> int main(void) { int k,x; scanf("%d %d",&k,&x); int isi = x-(k-1); int i = 0; while(i < k*2-1) { printf("%d ",isi); isi++;i++; } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220142/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220142/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int K, X; scanf("%d%d", &K, &X); for (int i = -K+1; i < K; i++) { printf("%d%c", X+i, i == K-1?'\n':' '); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220186/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220186/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 L, N; int x, w; int i; int AsumiKana = 0; if (scanf("%d", &L) != 1) return 1; if (scanf("%d", &N) != 1) return 1; for (i = 0; i < N; i++) { if (scanf("%d%d", &x, &w) != 2) return 1; AsumiKana += x * w; } if (AsumiKana > 0) { printf("1\n-1 %d\n", AsumiKana); } els...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { long long int n; scanf("%lld",&n); long long int count = 1; while( n > count) { n = n - count; count++; } if(n> 0) { printf("%lld",n); } else printf("%lld",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22028/source.c" target datalayout = "e-m:e-p270:32:32-p271: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() { long long int x,i,n,s; x=1; scanf("%lld",&n); for(i=1;((i*(i+1))/2)<=n;i++) { x=i; } s=(x*(x+1))/2; // printf("x=%lld ",x); if((x*(x+1)/2)==n) printf("%lld\n",x); else printf("%lld\n",(n-s)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22033/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> struct Node{ int key; struct Node *right; struct Node *left; struct Node *parent; }; struct Node *root; struct Node *NIL; struct Node *find(struct Node *u, int k){ while (u != NIL && k != u->key){ if(k < u->key) u = u->left; else u = u->ri...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220380/source.c" target datalayout = "e-m:e-p270: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> #include <string.h> struct node { int key; struct node *parent, *left, *right; }; struct node *tree, *z; void insert(struct node *T, struct node *z); void find(int key); void inorder(struct node *p); void preorder(struct node *p); int main(int argc, char*argv[]) { int m,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220430/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220430/source.c" target datalayout = "e-m:e-p270: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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ } Node treeSearch(Node u, int k){ while(u !=NIL){ if(u->key == k)break; else if(u->key...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220474/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220474/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeMinimum(Node x){ while(x->left!=NIL){ x=x->left; } return x; } Node treeSearch(Node u, int k){ if(u==NIL ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220517/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220517/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100000 #define NIL -1 typedef struct search{ struct search *right; struct search *left; struct search *p; int key; }search; void insert(int); void inorderTreeWalk(search *x); void Puriorder(search *x); search *find(search *x, int k)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220575/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220575/source.c" target datalayout = "e-m:e-p270: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.search = type { ptr...
#include <stdio.h> #include <stdlib.h> #include <string.h> struct Node{ int key; struct Node *right,*left,*parent; }; struct Node *root,*NIL; struct Node * find(struct Node *u,int k){ while(u!=NIL && k!=u->key){ if(k < u->key) u=u->left; else u=u->right; } return u; } void insert(int k){ struct ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220625/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220625/source.c" target datalayout = "e-m:e-p270: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> struct Node{ int key; struct Node *r,*l,*p; }; struct Node *B,*NIL; void insert(int k){ struct Node *y = NIL; struct Node *x = B; struct Node *z; z = (struct Node *)malloc(sizeof(struct Node)); z->key = k; z->l = NIL; z->r = NIL; while(x!=NIL){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220676/source.c" target datalayout = "e-m:e-p270: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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; //Node T_root; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220719/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include<stdio.h> int main() { int h,m,n; scanf("%d:%d",&h,&m); scanf("%d",&n); m=m+n; if(m<60) { if(h<10) printf("0%d",h); else printf("%d",h); printf(":"); if(m<10) printf("0%d",m); else printf("%d",m); return 0; } if(m>=60) { h=h+(m/60); m=m%60; if(h<24) { if(h<10) printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22077/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root =NIL; Node treeMinimum(Node x){ while(x->right!=NIL)x=x->left; return x; } Node treeSearch(Node x, int k){ while (x!=NIL && k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
/* * FileName: binary_tree_2 * CreatedDate: 2020-04-22 21:32:11 +0900 * LastModified: 2020-04-23 01:02:05 +0900 */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define node_max 500000 typedef struct _node{ long int number; struct _node *pare; struct _node *left; struct _node *rig...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220863/source.c" target datalayout = "e-m:e-p270: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 { i64,...
//Binary tree search 2 #include<stdio.h> #include<stdlib.h> #define N NULL typedef struct node { struct node *p, *l, *r; int w; }*tree; void prepare(tree *root, int w) { (*root) = (tree)malloc(sizeof(struct node)); (*root)->p = N; (*root)->l = N; (*root)->r = N; (*root)->w = w; } void ins(tree *r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_220906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_220906/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <stdio.h> #include <math.h> int main() { long long int n,i; scanf("%I64d",&n); double num=-0.5+sqrt(2*n+0.25); long long int temp=(int)num; long long int rem=n-(temp*(temp+1)/2); if(rem==0) { printf("%I64d",temp); } else { /*int sum=0; for(i=1;i<=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22095/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> long long int ab(long long int a, long long int b) { if(a>b) return a-b; return b-a; } int main() { int t; scanf("%d", &t); while(t--) { int n; scanf("%d", &n); long long int a=0,b=0; for(int i=1;i<=n;i++) { if(i >= n/2 &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2210/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <stdlib.h> struct node{ struct node *right; struct node *left; struct node *parent; int key; }; typedef struct node * Node; #define NIL NULL Node root; void insert(int k){ Node y = NIL; Node x = root; Node z; z = malloc(sizeof(struct node)); z->key = k; z->left = NIL;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221042/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct tree_t{ int key; struct tree_t *left; struct tree_t *right; }TREE_T; TREE_T *TREE; TREE_T *Find(int key) { TREE_T *y = NULL; TREE_T *x = TREE; while(x != NULL){ if(key == x->key) return x; y = x; if(key < x->key) x = x->l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221086/source.c" target datalayout = "e-m:e-p270: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.tree_t = type { i32...
#include<stdio.h> #include<stdlib.h> struct node{ struct node *r; struct node *l; struct node *p; int key; }; typedef struct node * Node; #define NIL NULL Node root; Node treeSearch(Node u,int k){ if(u == NIL || k == u->key) return u; if(k < u->key) return treeSearch(u->l,k); else return treeSearch(u->r,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221143/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221143/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include<stdio.h> #include<stdlib.h> #include<string.h> struct Node{ int k; struct Node *right; struct Node *left; struct Node *parent; }; struct Node *root, *NIL; void Insert(int); void Inorder(struct Node *); void Preorder(struct Node *); struct Node * Find(struct Node *, int); int main(){ int str1 = 0,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221187/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221187/source.c" target datalayout = "e-m:e-p270: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> int main(){ int t; scanf("%d",&t); while(t--){ long long n,r=1,m=1e9+7; scanf("%lld",&n); for(int i=2*n;i>=3;i--){ r=(r*i)%m;; } r=r%m; printf("%lld\n",r); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22123/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> // printf(), scanf() #define MAX_N 500000 typedef struct node_tbl { int key; int parent; int left; int right; } node; const int nil = -1; node t[MAX_N + 1]; int root; int ix; int find(int u, int k) { while (u != nil && k != t[u].key) { if (k < t[u].key) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221273/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221273/source.c" target datalayout = "e-m:e-p270: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_tbl = type { i...
#include <stdio.h> #include <stdlib.h> #include <string.h> int X[100], Y[100]; int main() { int N, K; scanf ("%d %d", &N, &K); printf("%d", K==1?0:N-K); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221323/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221323/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k; scanf("%d%d", &n, &k); if(k == 1 || n == k){ printf("%d\n", 0); return 0; } printf("%d\n", n - k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221367/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221367/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int further_solve(long long int n,long long int ans){ if (n==2) return 1; if (n==3) return 3; ans = (n*((further_solve(n-1,ans))%(1000000007)))%1000000007; return ans; } void solve(){ long long int n; scanf("%lld",&n); long long int ans = 3; printf("%lld",further_solve(2*n,an...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22141/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define YYES #Yay! #define NNO #:( int main() { int n; int k; scanf("%d %d", &n, &k); printf("%d\n", n % k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221453/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221453/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> #define WHITE 0 #define BLACK 1 int **matrix; int *d; int *parent; int *color; void dijkstra(int); int main() { int n,i,j,k,u,v; scanf("%d",&n); color = malloc(n * sizeof(int )); d = malloc(n * sizeof(int )); parent = malloc(n * sizeof(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221510/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221510/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100 #define INFTY 200000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int n, m[MAX][MAX]; void dijkstra(void); int main() { int i, j, k, c, u, v; scanf("%d", &n); for(i=0; i<n; i++) { for(j=0; j<n; j++) { m[i][j] = INFTY; } } for(i=0; i<n;i++) { scanf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221561/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221561/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100 #define INFTY 200000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int n,T[MAX][MAX]; void dijkstra(){ int minv,i,v,u; int d[MAX],color[MAX]; for(i=0;i<n;i++){ d[i] = INFTY; color[i] = WHITE; } d[0] = 0; color[0] = GRAY; while(1){ minv = INFTY; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221611/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221611/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...
#include <stdio.h> #define N 101 #define INFTY 200000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int n,M[N][N]; void dijkstra(); int main(){ int i,j; int k,c,u,v; scanf("%d",&n); for(i=0; i<n; i++){ for(j=0; j<n; j++){ M[i][j] = INFTY; } } for(i=0; i<n; i+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221655/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221655/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define MAX_N 100 const int inf = 1<<25; int n; int A[MAX_N][MAX_N]; int used[MAX_N]; int mincost[MAX_N]; int main() { int i, j; scanf("%d", &n); memset(A, -1, sizeof(A)); for(i = 0; i < n; i++) { int u, k; scanf("%d %d", &u, &k); for(j = 0; j < k; j++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @inf = dso_local local_unna...
#include <stdio.h> #define MAX 100 #define INF 1000000 #define W 0 #define B 1 #define NIL -2 int d[MAX],col[MAX],w[MAX][MAX]; void prim(int,int); void prim(int G,int r){ int u,min,i,pi[100],v; int count=0; for(u=0; u < G; u++){ d[u] = INF; col[u] = W; pi[u] = NIL; } d[r] = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221770/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221770/source.c" target datalayout = "e-m:e-p270: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> #define INFTY 2000000000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int n,A[100][100]; void dijkstra(){ int i,j,k,u,min,d[100],color[100]; for(i=0;i<n;i++){ d[i]=INFTY; color[i]=WHITE; } d[0]=0; color[0]=GRAY; while(1){ min=INFTY; u=-1; for(i=0;i<n;i++){ if(m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221828/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221828/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...
#include<stdio.h> #define MAX 100 #define INFTY 10000000 #define WHITE 0 #define GRAY 1 #define BLACK 2 void sssp(void ); int n, G[MAX][MAX]; void sssp(){ int minv,i,v,u; int d[MAX],color[MAX]; for(i = 0; i < n; i++) { d[i] = INFTY; color[i] = WHITE; } d[0] = 0; color[0] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221871/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221871/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...
#include <stdio.h> #define MAX 100 #define INF 1000000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int n, G[MAX][MAX]; void dij() { int i, u, v, min, d[MAX], color[MAX]; for (i = 0; i < n; i++) { d[i] = INF; color[i] = WHITE; } d[0] = 0; color[0] = GRAY; while (1) { min = INF; u = -1; for (i = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221914/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...
#include<stdio.h> typedef struct{ int have; int link[100]; int min; int weight[100]; int flag; }Tree; Tree data[100]; void input(int); void shokika(int); void shori(int,int,int); void listprint(int); void debug_listprint1(int); void debug_listprint2(int); int main(){ int n, i; scanf("%d",&n); sho...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_221958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_221958/source.c" target datalayout = "e-m:e-p270: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.Tree = type { i32, ...
#include<stdio.h> #include<math.h> int duang(long long int a,int n) { long long int as; as=pow(2,n-1); if(a==as)return n; if(a<as)return duang(a,n-1); if(a>as)return duang(a-as,n-1); } int main() { int n,sum; long long int k; scanf("%d %lld",&n,&k); sum=duang(k,n); printf("%d",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22200/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22200/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define MAX 100 static const int INFTY = (1<<21); static const int WHITE = 0; static const int GRAY = 1; static const int BLACK = 2; int n, M[MAX][MAX]; void dijkstra(){ int minv; int d[MAX], color[MAX]; for(int i=0; i<n; i++){ d[i] = INFTY; color[i] = WHITE; } d[0] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...
#include<stdio.h> #define MAX 100 #define INF 10000000 #define WHITE 0 #define GRAY 1 #define BLACK 2 void dijkstra(); int n,M[MAX][MAX]; int i,j; int main() { int k,c,u,v; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ M[i][j] = INF; } } for(i=0;i<n;i++){ scanf("%d%d",&u,&k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222094/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<limits.h> #define WHITE 0 #define GRAY 1 #define BLACK 2 int n,m[100][100]; void dijkstra(){ int min,i,j,u; int d[100],color[100]; for(i=0;i<n;i++){ d[i]=INT_MAX; color[i]=WHITE; } d[0]=0; color[0]=GRAY; while(1){ min=INT_MAX; u=-1; for(i=0;i<n;i++){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_222137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_222137/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0...