Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<math.h> int main() { int w1,h1,w2,h2,sum; while(~scanf("%d%d%d%d",&w1,&h1,&w2,&h2)) { sum=fabs(w1-w2); printf("%d\n",w1+w2+2*h1+2*h2+4+sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22472/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22472/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <math.h> #include <limits.h> #define REP(i,n) for(i=0;i<n;i++) int iin() { int i; scanf("%d", &i); return i; } long long llin() { long long i; scanf("%lld", &i); return i; } double din() { double i; scanf("%lf", &i);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224763/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224763/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> long long int get_digit(long long int n) { long long int index = 0; while (n!=0) { n = n/10; index++; } return(index); } long long int power(long long int x, long long int y) { long long int index = 0; long long int tmp = 1; //only for positive lon...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224813/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, char* argv[]){ int N; int P[7] = {0}; scanf("%d", &N); for(int i=1; i<=N; i++){ char str[11] = {0}; scanf("%s", str); char c = str[0]; if(c == '...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224857/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int w[2],h[2]; scanf("%d %d %d %d", &w[0], &h[0], &w[1], &h[1]); int ar[2]; for(int i = 0; i < 2; i++) ar[i] = (w[i]+2) * (h[i]+2) - (w[i] * h[i]); int ans = ar[0] + ar[1] - ( (w[1] + 2) * 2 ); printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22490/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22490/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #include <math.h> #include <time.h> int main() { int n, m = 0, i, j; long long int ans; scanf("%d", &n); char s[n][10]; for (i = 0; i < n; i++) { scanf("%s", s[i]); } long long int a[5]; // MARCHの数 for (i = 0; i < 5; i++) { a[i] = 0; } for (i = 0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224943/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b[5][5]; int i,f; while(scanf("%s",b[0])){ if(b[0][0]=='0')break;f=0; scanf("%s%s",b[1],b[2]); for(i=0;i<3;i++){ if(b[i][0]!='+' && b[i][0]==b[i][1] && b[i][1]==b[i][2]){ printf("%c",b[i][0]); f++;break;} else if(b[0][i]!='+' && b[0][i]==b[1][i] && b[1][i]==b[2]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_224994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_224994/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100], W[100]; int i, j, k; int n = 0; while (1) { scanf("%d %d", &H[n], &W[n]); if (H[n] == 0 && W[n] == 0) { break; } n++; } for (i = 0; i < n; i++) { for (j = 0; j < H[i]; j++) { for (k = 0; k < W[i]; k++) { if (j % 2 == 1 && k % 2 == 1 || ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225036/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define Max(a,b) a>b ? a : b #define Min(a,b) a<b ? a : b int main() { int q; scanf("%d", &q); while(q--) { long long int n, min=10e9, max=0, a, b, t=0; scanf("%lld", &n); if(n==1) { t=1; } while(n--) { sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22508/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22508/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 rep(i, n) for(i = 0; i < n; i++) int main(void) { int h, w, i, j; while(1) { scanf("%d %d", &h, &w); if(h == 0 && w == 0) break; rep(i, h) { rep(j, w) { if((i + j) % 2 == 0) putchar('#'); else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225122/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int 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 % 2 == 0){ if(j % 2 == 0) printf("#"); else printf("."); }else{ if(j % 2 == 0) printf(".");...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225166/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int w,h,i,j; while(1){ scanf("%d %d",&w,&h); if(w==0&&h==0) break; for(i=0;i<w;i++){ for(j=0;j<h;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_225209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225209/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> char mark[2][2] = {{'#', '.'}, {'.', '#'}}; void draw_rect(int h, int w) { int i, j; for(i=0;i<h;i++){ for(j=0;j<w;j++){ printf("%c",mark[i&1][j&1]); } printf("\n"); } } int main(void) { int h, w; while(1){ scanf("%d %d", &h, &w); if(!(h|w)) break; draw_rect(h, w); printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225252/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mark = dso_local local_unn...
#include <stdio.h> int main(void){ int i = 0; int a[i+100],b[i+100]; while(1){ scanf("%d %d",&a[i],&b[i]); if(a[i] == 0 && b[i] == 0){ break; } i = i + 1; } int j, H ,W; for(j = 0;j < i;j++){ for(H = 0;H < a[j];H++){ for(W = 0;W < b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225296/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// Aizu 0212: Highway Express Bus // 2017.9.9 bal4u@uu #include <stdio.h> #include <string.h> #define INF 0x7fffffff #define MAX 5000 typedef struct { int t, k, c; } QUE; QUE que[MAX]; int qsize; #define PARENT(i) ((i)>>1) #define LEFT(i) ((i)<<1) #define RIGHT(i) (((i)<<1)+1) void min_heapify(int i) { int l, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225360/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225360/source.c" target datalayout = "e-m:e-p270: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.QUE = type { i32, i...
#include<stdio.h> #include<stdlib.h> #include<string.h> #define MAXLEN 12 struct Data { char S[MAXLEN]; int index, P; }; typedef struct Data data; int cmp(const void *a, const void *b) { data *d1 = (data *)a; data *d2 = (data *)b; if( strcmp((*d1).S, (*d2).S) == 0) { return (*d1).P < (*d2).P; } el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Data = type { [12 x...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> typedef struct { int no; char s[11]; int p; } rest; int cmp( const void *p, const void *q ) { int n; n = strcmp(((rest*)p)->s ,((rest*)q)->s); if( n == 0 ) n = ((rest*)q)->p - ((rest*)p)->p; return n; } int main...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225461/source.c" target datalayout = "e-m:e-p270: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.rest = type { i32, ...
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> int main(void){ int N; scanf("%d",&N); int P[N]; char S[N][11]; char temp[11]; int num[N]; for(int i=0;i<N;i++){ scanf("%s %d",S[i],&P[i]); num[i] = i+1; } int itemp = 0; for(int i=1;i<N;i+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225511/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225511/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char s[20]; scanf("%s",s); int i; for(i=0;i<19;i++){ if(s[i]==',') printf(" "); else printf("%c",s[i]); } puts(""); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225562/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225562/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; for (i = 0; i < 5+7+5+2; i++) { char c; scanf("%c", &c); if (c==',') putchar(' '); else putchar(c); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225605/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225605/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { char s[20]; scanf("%s", s); s[5] = ' '; s[13] = ' '; puts(s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { char a[20]; scanf("%s",a); a[5]=a[13]=32; printf("%s",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225692/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225692/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { char a[100]; scanf("%s",a); int n=strlen(a); for(int i=0;i<n;i++){ if(a[i]==','){ a[i]=' '; } } printf("%s",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225742/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225742/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i; char s[20]; scanf("%s",s); for(i=0;i<strlen(s);i++) if(s[i]==',') s[i]=' '; puts(s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225786/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 solve(void) { char s[21]; fgets(s,sizeof(s),stdin); s[5]=s[13]=' '; printf(s); } int main(int argc, char **argv) { solve(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225850/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225850/source.c" target datalayout = "e-m:e-p270: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(){ char s[20]; scanf("%s",s); for(int i = 0; i<19; i++){ if(s[i] == ','){ printf(" "); }else{ printf("%c",s[i]); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225900/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225900/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a=0,b=0,c=0,count=0; scanf("%lld",&a); scanf("%lld",&b); scanf("%lld",&c); if(a+b==0) { count=0; } if(a+b!=0&&c==0) { count=b; } if(a+b==c||a+b>c&&a+b!=0&&c!=0) { count=b+c; } i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_225959/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_225959/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d%d%d", &a, &b, &c); if (c < a + b) { printf("%d\n", b + c); } else if (c == a + b) { printf("%d\n", b + c); } else { printf("%d\n", b + a + b + 1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226000/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226000/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int A,B,C; scanf("%d",&A); scanf("%d",&B); scanf("%d",&C); if(A+B<C){ printf("%d\n",A+B+B+1); }else{ printf("%d\n",B+C); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 dp[31]={0,1,2,4}; int i,n; for(i=4;i<=30;i++){ dp[i] = dp[i-1] + dp[i-2] + dp[i-3]; } while(scanf("%d",&n),n){ printf("%d\n",dp[n]/3650 + ((dp[n]%3650)!=0)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226088/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s[30]={1,2,4}; scanf("%d",&n); while(n!=0){ if(n==1 || n==2 || n==3){ printf("1\n"); }else{ for(i=3; i<n; i++){ s[i]=s[i-3]+s[i-2]+s[i-1]; } if((s[(n-1)])%3650==0){ printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226145/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,p,i,x,z; scanf("%d %d",&n,&c); x=0; for(i=0;i<c;i++){ scanf("%d",&p); x+=p; } n++; z=x/n; if(x%n!=0) z++; printf("%d\n",z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226196/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226196/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,H,W; scanf("%d",&N); scanf("%d",&H); scanf("%d",&W); printf("%d",(N-H+1)*(N-W+1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226253/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226253/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(void) { int n, w, h, ans; if(scanf("%d %d %d", &n, &w, &h) == 1); ans = (n - w + 1) * (n - h + 1); printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226297/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226297/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rep(i, n) for (int i = 0; i < (int)(n); i++) #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) int main(void) { int n, p[20]; int ans = 0; scanf("%d", &n); rep(i, n) scanf("%d", &p[i]); rep(i, n - 2) if (p[i + 1] != min(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226361/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226361/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, p[100], a = 0; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", &p[i]); for (i = 1; i < n - 1; i++) if ((p[i - 1] > p[i] && p[i] > p[i + 1]) || (p[i + 1] > p[i] && p[i] > p[i - 1])) a++; printf("%d", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226404/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226404/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ans=0; scanf("%d",&n); int p[n+1]; for(int i=1;i<=n;i++){ scanf("%d",&p[i]); } for(int i=2;i<=n-1;i++){ if((p[i-1]<p[i] && p[i]<=p[i+1]) || (p[i-1]>=p[i] && p[i]>p[i+1])){ ans+=1; } } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226448/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226448/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n; scanf("%d",&n); int a[n]; for(int i=0; i<n; i++){ scanf("%d",&a[i]); } int count = 0; for (int i=1; i<n-1; i++){ if (a[i-1] < a[i] && a[i] < a[i+1]){ count++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226491/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226491/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, x = 0; scanf("%d", &n); int p[n]; for(i = 0; i < n; i++){ scanf("%d", &p[i]); } for(i = 0; i < n-2 ; i++){ if(p[i] < p[i+1] && p[i+1] < p[i+2]){ x += 1; } if(p[i] > p[i+1] && p[i+1] > p[i+2]){ x += 1; } } printf("%d\n", x); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226534/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226534/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[20]; int ans=0; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%d",&p[i]); } for(int i=2;i<n;i++){ if(p[i-2]<p[i-1] && p[i-1]<p[i]){ ans++; } else if(p[i-2]>p[i-1] && p[i-1]>p[i]){ ans++; } else{} } printf("%d",ans); re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226578/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226578/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[21]; int c = 0; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d",&p[i]); } for (int i = 0; i < n-2; i++) { if ((p[i + 1] > p[i + 2] && p[i + 1] < p[i]) || (p[i + 1] > p[i] && p[i + 1] < p[i + 2])) { c++; } } printf("%d\n", c); return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226620/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> int main(void){ int i,j,k; int n; int p[22]; int count = 0; scanf("%d",&n); for(i = 0;i < n-1;i++){ scanf("%d\n",&p[i]); } scanf("%d",&p[i]); for(i = 1;i < n-1;i++){ if(p[i] < p[i-1] && p[i] > p[i+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226664/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> #include <ctype.h> #define MOD 1000000007 #define MAX(a,b) (a>b?a:b) #define MAX3(a,b,c) MAX(a,MAX(b,c)) #define MIN(a,b) (a<b?a:b) #define MIN3(a,b,c) MIN(a, MIN(b,c)) typedef long long lli; int cmp(const void *a, const void *b) { return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226707/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226707/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226750/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226750/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(A+B>C+D){ printf("Left\n"); }else if(A+B<C+D){ printf("Right\n"); }else{ printf("Balanced\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226794/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226794/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)) int main(){ int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); puts(a+b==c+d?"Balanced":a+b<c+d?"Right":"Left"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226844/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226844/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,L,R; scanf("%d %d %d %d",&A,&B,&C,&D); L=A+B; R=C+D; if(L==R){ printf("Balanced\n"); } else if(L>R){ printf("Left\n"); } else if(R>L){ printf("Right\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226888/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226888/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define MOD 1000000007 typedef uint64_t ull; typedef int64_t sll; #define N_MAX...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226930/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226930/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.hw = type { i32, i3...
#include <stdio.h> int main(void) { int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a+b<c+d){ printf("Right"); } if(a+b==c+d){ printf("Balanced"); } if(a+b>c+d){ printf("Left"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_226974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_226974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b,c,d; int i,j; int e,f; scanf("%d %d %d %d %d",&n,&a,&b,&c,&d); i=j=0; do{ i+=a; j++; }while(i<n); e=j*b; i=j=0; do{ i+=c; j++; }while(i<n); f=j*d; if(e>f)e=f; printf("%d\n",e); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 P(type,x) fprintf(stdout,"%"#type"\n",x) #define S(type,x) fscanf(stdin,"%"#type,&x) int gcd(int p, int q) { if (q == 0)return p; gcd(q, p%q); } int main() { int p,q; S(d, p), S(d, q); q /= gcd(p,q); p = 2; int c = 1; while(p*p<=q){ if (q%p == 0) { c *= p; while (q%p == 0)q /= ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227067/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227067/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include<stdio.h> int main(void){ int x1,x2; scanf("%d %d",&x1,&x2); if(x1>=x2){ printf("%d\n",x1-x2); } else{ printf("%d\n",-(x1-x2)); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227153/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227153/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; (void) scanf("%d %d",&a,&b); if ( (a % 2 != 0) && (b % 2 != 0) ) { printf("Odd"); return 0; } printf("Even"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227197/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227197/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if (a * b % 2 == 0) printf("Even\n"); else printf("Odd\n"); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227247/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); if((a * b) % 2 == 0){ printf("Even\n"); } else{ printf("Odd\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227290/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d %d\n",&a, &b); c=a*b; if (c%2 == 0) { printf("Even\n"); }else{ printf("Odd\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include "stdio.h" int main(void){ int a,b; scanf("%d %d", &a, &b); if((a*b)%2 == 0){ printf("Even"); }else{ printf("Odd"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227377/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 gcd(long long a, long long b) { if(b==0) return a; return gcd(b,a%b); } int main() { long long left,right,i,j,k; scanf("%lld %lld",&left,&right); for(i=left;i<=right;i++) { for(j=i+1;j<=right;j++) { for(k=j+1;k<=right;k++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22742/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22742/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main() { int a, b; if (scanf("%d %d", &a, &b) < 0) { exit(1); } int product = a * b; if (product % 2 == 0) { printf("Even"); } else { printf("Odd"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227463/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227463/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int a,b; scanf("%d%d",&a,&b); if((a*b)%2 == 1){ printf("Odd"); } else{ printf("Even"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227506/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227506/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 l,r,d; scanf("%I64d %I64d",&l,&r); d=r-l; if(d>2) { if(l%2==0) printf("%I64d %I64d %I64d\n",l,l+1,l+2); else printf("%I64d %I64d %I64d\n",l+1,l+2,l+3); } else if(d<2) printf("-1\n"); else { if(l%2==0) printf("%I64d %I64d %I64d\n"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22755/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22755/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 gcd(long long a, long long b) { if (a == 0) return b; else return gcd(b%a, a); } int main() { long long i, j, k, l, m, flag = 1; scanf("%lld%lld", &i, &j); for (k = i; k <= j - 2; k++) { for (l = k + 1; l <= j - 1; l++) { if (gcd(k, l)) { for (m = l + 1; m <= j; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22760/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22760/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d",&a,&b); c=a*b; if(c%2==0){ printf("Even\n"); }else{ printf("Odd\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227643/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227643/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a, b; scanf("%d %d", &a, &b); a *= b; if(a % 2 == 0) printf("Even\n"); else printf("Odd\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227687/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227687/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int a,b; scanf("%d %d",&a,&b); if(a*b%2==0){ printf("Even\n"); } else{ printf("Odd\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227737/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227737/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); int x = a * b; x = x % 2; if(x == 0){ printf("Even\n"); }else{ printf("Odd\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227780/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227780/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int a, b; scanf("%d%d", &a, &b); printf("%s", a * b % 2 ? "Odd" : "Even"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227823/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227823/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a, b; scanf("%d %d%*c", &a, &b); if((a * b) % 2) printf("Odd\n"); else printf("Even\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227867/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227867/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 isprime(long long p) { int i; double max=sqrt(p); for(i=2;i<=max;i++) if(p%i==0)break; if(i>max && p!=1)return 1; return 0; } long long gcd(long long a,long long b) { long long i; for(i=a<b?a:b;i>0;i--) if((a%i==0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22791/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22791/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <math.h> #include <stdio.h> #include <stdlib.h> typedef struct { double x, y, z, r; } Coord; typedef struct { int parent, rank; } Node; typedef struct { int from, to; double weight; } Edge; Coord coord[ 100 ]; Node node[ 100 ]; Edge edge[ 4950 ]; int compare( const void *a, const void *b ) { double a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_227953/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_227953/source.c" target datalayout = "e-m:e-p270: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() { long long int t,n,i,j,num[100]; scanf("%lld",&t); for(i=0;i<t;i++) { scanf("%lld",&n); for(j=0;j<n;j++) { scanf("%lld",&num[j]); if(j%2) { if(num[j]>0) { num[j]=num[j]*(-1); } } else { if(num[j]<0) { num[j]=num[j]*(-1); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22801/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22801/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef long long ll; int g[101][101]; int H,W,N,x,k,i,j; int main() { while(scanf("%d%d%d",&H,&W,&N)!=EOF) { k=-1; for(i=1;i<=N;i++) { scanf("%d",&x); while(x--) k++,g[(k/H)&1?(H-1-(k%H)):k%H][k/H]=i; } for(i=0;i<H;i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228060/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228060/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> int gcd(int a,int b){ if(a<b){ int now=a; a=b; b=a; } int r=a%b; while(r!=0){ a=b; b=r; r=a%b; } return b; } int main(void){ int n; scanf("%d",&n); int g=0; int f=1000; int i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n, a[100], i,max=0,min=1000; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d",&a[i]); if(a[i]>max){ max=a[i]; } if(a[i]<min){ min=a[i]; } } printf("%d\n",max-min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228154/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int n, a[100], i, j, tmp=0; scanf("%d\n", &n); for (i=0; i<n; i++) { scanf("%d", &a[i]); } for (i=0; i<=n-2; i++) { for (j=i+1; j<=n-1; j++) { if (a[i] > a[j]) { tmp = a[j]; a[j] = a[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228198/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int N, a[100]; scanf("%d", &N); for(int i = 0; i < N; i++){ scanf("%d", &a[i]); } int max = a[0], min = a[0]; for(int i = 1; i < N; i++){ if(max < a[i]) max = a[i]; if(min > a[i]) min = a[i]; } printf("%d\n", max - min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228240/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int max = 0, min = 1000; scanf("%d", &N); for (int i = 0; i < N; i++) { scanf("%d",&a); if (a > max) max = a; if (a < min) min = a; } printf("%d\n", max - min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cmp(const void*a,const void*b){ return *(int*)a-*(int*)b; } int main(int argc, char const *argv[]){ int n,a[100],i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } qsort(a,n,sizeof(int),cmp); printf("%d\n",a[n-1]-a[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228327/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ // Your code here! int n, a=1, b, c=0, i; scanf("%d",&n); while(a<=n){ b=0; for(i=1;i<=a;i++){ if(a%i==0) b++; } if((b==8)&&(a%2==1)) c++; a++; } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228370/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228370/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, cont, cont2=0; scanf("%d", &n); for (int i=0;(2*i)+1<=n;i++){ cont =0; for(int a=0;(2*a)+1<=(2*i)+1;a++){ if((((2*i)+1)%((2*a)+1))==0){ cont++; } } if(cont==8){ cont2++; } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228413/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228413/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rep2(i,l,r) for((i)=(l);(i)<=(r);(i)+=2) int solve(int i){ int j,ans=0; for(j=1;j<=i;j++){ if(i%j==0)ans++; } if(ans==8)return 1; else return 0; } int main(){ int n,i,ans=0; scanf("%d",&n); if(n<=105){ ans=n/105; printf("%d",ans); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228457/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){ freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int n, k, a[1000], b[1000], i, j, t; scanf("%d%d", &n, &k); for (i = 0 ; i < n ; ++i){ scanf("%d", &t); for (j = i ; j > 0 ; --j){ if (a[j - 1] >= t)break; a[j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22850/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22850/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int n; scanf("%d", &n); if(n < 105) { printf("0\n"); } else if(n < 135) { printf("1\n"); } else if(n < 165){ printf("2\n"); } else if(n < 189){ printf("3\n"); } else if(n < 195){ printf("4\n"); } else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228550/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228550/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,r; scanf("%d", &n); r=0; for(int i=n; i>0; i--){ for(int j=1; j<=i; j++){ if(i%2!=0 && i%j==0){c++;} } if(c==8){r++;} c=0; } printf("%d", r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228600/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228600/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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=0; scanf("%d",&a); if(a>=105)b++; if(a>=135)b++; if(a>=165)b++; if(a>=189)b++; if(a>=195)b++; printf("%d",b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228644/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228644/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main() { char o[51]={},e[51]={}; int i,j=0,k=0; scanf("%s %s",o,e); for(i=1;i<=(strlen(o)+strlen(e));i++) { if(i%2==1) { printf("%c",o[j]); j++; } else { printf("%c",e[k]); k++; } } printf("\n"); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228688/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228688/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<limits.h> #include<math.h> int main(void){ char O[51], E[51]; scanf("%s", O); scanf("%s", E); int i; for(i=0; i<strlen(O)-1; i++) { printf("%c%c", O[i], E[i]); } printf("%c", O[strlen(O) - 1]); if(strlen(O) == str...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void) { char o[51],e[51]; int i; scanf("%s%s",o,e); for(i=0;i<strlen(o);i++){ printf("%c",o[i]); if(e[i]!='\0')printf("%c",e[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228789/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void){ int i,sum=0; char o[51],e[51]; scanf( "%s",o ); scanf( "%s",e ); int lo = strlen(o); int le = strlen(e); for( i = 0; i < le; i++ ){ printf( "%c%c",o[i],e[i] ); } if( lo > le && e[i] == '\0' ){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228839/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> typedef float fl; typedef char ch; typedef long long ll; #define rep(i,a,n) for(i=a;i<n;i++) #define rev(i,n,a) for(i=n;i>=a;i--) #define repr(i,a,b) for(i=a;i<b;i++) #define s(n) scanf("%d",&n); #define s2(n,m) scanf("%d%d",&n,&m); #define s3...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22889/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22889/source.c" target datalayout = "e-m:e-p270:32:32-p271: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\n",&t); while(t-->0) { int n,x; scanf("%d%d\n",&n,&x); int a[n],sum=0,p=0,k=0,sum1=0; for(int i=0;i<n;i++) scanf("%d",&a[i]); for(int i=0;i<n;i++){ sum=sum+a[i]; } sum1=sum; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_22894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_22894/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int a; char s[11]; scanf("%d\n", &a); scanf("%s\n", s); if(a >= 3200) printf("%s", s); else printf("red"); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_228983/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_228983/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[11]; scanf("%d",&a); scanf("%s",s); if(a>=3200)printf("%s\n",s); else puts("red"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &a); char s[11]; scanf("%s", s); if (a >= 3200){ printf(s); }else{ printf("red"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229069/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[11]; scanf("%d",&a); scanf("%s",s); if(a>=3200){ printf("%s",s); }else{ printf("red"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229111/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[10]; scanf("%d",&a); scanf("%s",s); if(a>=3200){ printf("%s",s); } else{ printf("red"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229155/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char cor[50]; scanf("%d", &a); scanf("%s", cor); if (a >= 3200) { printf("%s\n", cor); } else { printf("red\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { char tab[11]; int a; scanf("%d",&a); scanf("%s",tab); if (a<3200) { printf("red\n"); } else printf("%s\n",tab ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229241/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, s[10]; scanf("%d %s", &a, &s); if(a >= 3200){ printf("%s", s); }else{ printf("red"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229285/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229285/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s[10]; scanf("%d\n%s\n",&a,s); if (a>=3200) printf("%s\n",s); else printf("red\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_229328/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_229328/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...