Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(void) { long long int n; char s[4000]; long long int count_R=0, count_G=0, count_B=0; long long int ans=0, not_ans=0; long long int i, j; scanf("%lld", &n); scanf("%s", s); for (i=0;i<n;i++) { switch (s[i]) { case 'R': count_R++; break; case 'G': count_G++; b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232127/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232127/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); char s[n+1]; scanf("%s", &s); long long int R=0, G=0, B=0; for(int i=0;i<n;i++){ if(s[i]=='R') R++; if(s[i]=='G') G++; if(s[i]=='B') B++; } long long int X=0; for(int d=1;d<n;d++){ for(int i=0;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232178/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232178/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <time.h> #include <math.h> #include <limits.h> #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 long #define INF 100000000 #define MOD 1000000007 #define SIZ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232220/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232220/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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{ int *s; int cnt; }score; typedef struct{ int *r; int cnt; }rank; void sort(rank *R){ int i,tmp; for(i=R->cnt-1;i>0;i--){ if(R->r[i]>R->r[i-1]){ tmp=R->r[i]; R->r[i]=R->r[i-1]; R->r[i-1]=tmp; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232264/source.c" target datalayout = "e-m:e-p270: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.rank = type { ptr, ...
#include<stdio.h> int main(){ int a[10001],b[10001],c,i,j,n=0,x[10001]; while(1){ scanf("%d,%d\n",&a[n],&b[n]); if(a[n]==0 && b[n]==0){ break; } n++; } for(i=0;i<n;i++){ for(j=n-1;j>i;j--){ if(b[j-1]<b[j]){ c=b[j-1]; b[j-1]=b[j]; b[j]=c; c=a[j-1]; a[j-1]=a[j]; a[j]=c; } } } x[0]=1; for(i=1;i<n;i++){ if(b[i-1]==b[i]){ x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, T; int l; int i, j, tmp; int a[100]; int sum = 0; int min = 0; scanf("%d%d", &K, &T); for (l = 0; l < T; l++) scanf("%d", &a[l]); for (i = 0; i < T; i++) {for ( j = i+1; j < T; j++) {if (a[i] < a[j]) { tmp = a[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232350/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232350/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232394/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232394/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <assert.h> int main(void) { int N, Q, i, *AC, *l, *r; char *S; scanf("%d%d",&N,&Q); AC = (int*)malloc(sizeof(int)*N); assert(AC); S = (char*)malloc(sizeof(char)*(N+1)); assert(S); l = (int*)malloc(sizeof(int)*Q); assert(l); r = (int*)malloc(sizeof(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232437/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,q; scanf("%d%d",&n,&q); int l[q],r[q]; char s[n+1]; scanf("%s",s); for(int i=0;i<q;i++){ scanf("%d%d",&l[i],&r[i]); } int chk[100001]={0}; for(int i=1;i<n;i++){ if(s[i]=='C'&&s[i-1]=='A'){ chk[i]=chk...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232480/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232480/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Q; scanf("%d",&N); scanf("%d",&Q); char S[100001]; scanf("%s",S); int l[Q]; int r[Q]; for(int i=0;i<Q;i++){ scanf("%d",&l[i]); scanf("%d",&r[i]); } int num[100001]={}; for(int i=0;i<N;i++){ if(S[i]=='A'&&S...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232523/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232523/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x[200]; int y[200]; int i,n,d,max,min; while(scanf("%d",&N),N){ x[0]=0; y[0]=0; for(i=1;i<N;i++){ scanf("%d %d",&n,&d); switch(d){ case 0: x[i]=x[n]-1; y[i]=y[n]; break; case 1: x[i]=x[n]; y[i]=y[n]-1; break; case...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232567/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232567/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #define N 8 #define NOT_FREE 1 #define FREE 0 void putQueen(int); void printBoard(void); int M[N][N],row[N],col[N],dneg[2*N-1],dpos[2*N-1]; int main(){ int k,i,j,r,c; scanf("%d",&k); for(i=0; i<N; i++){ // col[i] = row[i] = dneg[i] = dpos[i] = FR...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdbool.h> #define N 8 #define FREE -1 #define N_FREE 1 int row[N],col[N],dpos[2*N-1],dneg[2*N-1]; bool X[N][N]; void initialize(){ int i; for(i=0;i<N;i++){ row[i]=FREE,col[i]=FREE; } for(i=0;i<2*N-1;i++){ dpos[i]=FREE; dneg[i]=FREE; } } void printBoard(){ int i,j;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232710/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @row = dso_local local_unna...
#include <stdio.h> #define NOT_FREE 1 #define FREE -1 #define N 8 int B[N][N], row[N], col[N],dpos[2 * N - 1], dneg[2 * N - 1], row[N];//?????????????????????????¨? void init(){ int i; for(i = 0; i < N; i++) row[i] = col[i] = FREE; for(i = 0; i < 2 * N - 1; i++) dpos[i] = dneg[i] = FREE; } void printBoard(){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232754/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @col = dso_local local_unna...
#include <stdio.h> #include <stdio.h> #define N 8 #define FREE 1 #define NOT_FREE 0 int A[N][N]; int row[N],col[N],dpos[2*N-1],dneg[2*N-1]; void print(){ int i,j; for(i=0;i<N;i++){ for(j=0;j<N;j++){ if(A[i][j]){ if(row[i]!=j) return ; } } } for(i=0;i<N;i++){ for(j=0;j<N;j++){ if(row[i]==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232798/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @A = dso_local local_unname...
#include<stdio.h> #define N 8 #define FREE -1 #define NOT_FREE 1 int tate[N],yoko[N],hnaname[2*N-1],mnaname[2*N-1]; int X[N][N]; void initialize(){ int i; for(i=0;i<N;i++){tate[i]=FREE; yoko[i]=FREE;} for(i=0;i<2*N-1;i++){hnaname[i]=FREE; mnaname[i]=FREE;} } void print(){ int i,j; for(i=0;i<N;i++){ for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232840/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @tate = dso_local local_unn...
#include<stdio.h> #define NOT_FREE (-1) #define FREE (-2) #define N 8 #define TRUE 1 #define FALSE 0 void putQueen(int); void printBoard(void); int col[N],dpos[N*2-1],dneg[N*2-1],row[N],X[N][N]; int main() { int insert,i,j,k; for(i=0;i<N;i++) { col[i]=FREE; row[i]=FREE; } for(i=0;i<N*2-1;i++)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232891/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @col = dso_local local_unna...
#include <stdio.h> #define N 8 #define FREE -1 #define NOT_FREE 1 int row[N], col[N], dpos[2*N-1], dneg[2*N-1]; char q[N][N]; void putQueen(int); void printBoard(void); void initialize(void); int main() { int i, j, k, r, c; for (i = 0; i < N; i++) { row[i] = FREE; col[i] = FREE; } for (i = 0; i < 2...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @row = dso_local local_unna...
#include <stdio.h> #define N 8 #define FREE -1 #define NOT_FREE 1 int row[N], col[N], dpos[2*N-1], dneg[2*N-1]; int X[N][N]; void printBoard() { int i, j; for(i=0;i<N;i++){ for(j=0;j<N;j++){ if(X[i][j]){ if(row[i]!=j){ return; } } } } for(i=0;i<N;i++){ for(j=0;j<N;j++){ i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_232985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_232985/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @X = dso_local local_unname...
#include<stdio.h> #define MAX 8 #define FREE -1 #define ATACK 1 #define TRUE 100 #define FALSE -100 int row[MAX],col[MAX],dpos[2*MAX-1],dneg[2*MAX-1]; int CHESS[MAX][MAX]; void init(){ int i; for(i = 0; i < MAX; i++)row[i] = col[i] = FREE; for(i = 0; i < 2*MAX-1; i++)dpos[i] = dneg[i] = FREE; } void print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233027/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @col = dso_local local_unna...
#include <stdio.h> #define N 8 #define FREE 0 #define N_FREE -1 int row[N]; int col[N]; int dpos[N * 2]; int dneg[N * 2]; int in[N]; void put(int); int main() { int i, j, r, c; for (i = 0; i < N; i++) in[i] = N_FREE; scanf("%d", &j); for (i = 0; i < j; i++) { scanf("%d %d", &r, &c); /*row[r] = c; col[c] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233070/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @in = dso_local local_unnam...
#include<stdio.h> #define NUM 8 #define FREE -1 #define NOT 1 void recursive(int); void print(); int chess[NUM][NUM]; int row[NUM]; int col[NUM]; int dpos[2*NUM-1]; int dneg[2*NUM-1]; int main(){ int k,r,c,i,j; for(i=0;i<NUM;i++){ row[i]=FREE; col[i]=FREE; } for(i=0;i<2*NUM-1;i++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233113/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @row = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #define N 8 #define FREE -1 #define NOFREE 1 int row[N]; int col[N]; int dpos[2*N-1]; int dneg[2*N-1]; char X[N][N]; void initialize(){ int i; for(i=0;i<N;i++){ row[i]=FREE; col[i]=FREE; } for(i=0;i<2*N-1;i++){ dpos[i]=FREE; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233157/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @row = dso_local local_unna...
#include <stdio.h> #include<stdlib.h> #include<math.h> int main() { long long int n,k; scanf("%lld %lld",&n,&k); int a[n]; int i; for(i=0;i<n;i++) scanf("%d",&a[i]); int c1=0,c2=0,c3=0; for(i=0;i<n;i++) { if(a[i]<=k) { c1++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23320/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23320/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 A, B, C, D; scanf("%d %d %d %d", &A, &B, &C, &D); printf("%d\n", ((A < B)? A: B) + ((C < D)? C: D)); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233250/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233250/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int A,B,C,D; scanf("%d%d%d%d", &A, &B, &C, &D); int x; if( A < B ) x = A; else x = B; int y; if( C < D ) y = C; else y = D; int ans = x + y; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233294/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233294/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); int ans=0; if(a<=b){ ans+=a; }else{ ans+=b; } if(c<=d){ ans+=c; }else{ ans+=d; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233337/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233337/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int e,f; scanf("%d\n%d\n%d\n%d",&a,&b,&c,&d); if(a>b){ e=b; }else{ e=a; } if(c>d){ f=d; }else{ f=c; } printf("%d",e+f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233380/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&A); scanf("%d",&B); scanf("%d",&C); scanf("%d",&D); int one,two; if(A>B)one=B; else one=A; if(C>D)two=D; else two=C; printf("%d\n",one+two); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233423/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { int A,B,C,D,sum=0; scanf("%d",&A); scanf("%d",&B); if(A>B){ sum=sum+B; } else{ sum=sum+A; } scanf("%d",&C); scanf("%d",&D); if(C>D){ sum=sum+D; } else{ sum=sum+C; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233467/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233467/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ll long int int main() { char s[1005]; ll l,n1,st,e,n,i,flag; scanf("%s",s); scanf("%ld",&l); n=strlen(s); if(n%l!=0) printf("NO"); else { n1=n/l; flag=1; for(i=0;i<l;i++) { st=i*n1; e=st+n1-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23351/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23351/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,d; scanf("%d %d %d %d",&a,&b,&c,&d); if(a<=b&&c<=d){ printf("%d\n",a+c); } else if(a<=b&&c>=d){ printf("%d\n",a+d); } else if(a>=b&&c<=d){ printf("%d\n",b+c); } else{ printf("%d\n",b+d); } return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define INIT_CAP 10 #define INF 1000000000 #define min(a, b) (((a) < (b)) ? (a) : (b)) const int di[4] = {-1, 0, 1, 0}; const int dj[4] = {0, 1, 0, -1}; typedef struct { int to, w; } Edge; typedef struct { Edge *elem; int cap, size; } VecEdge; typedef struct { int num; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233597/source.c" target datalayout = "e-m:e-p270: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.VecEdge = type { pt...
#include<stdio.h> int findmax(int a[],int n) { int i,max=0; for(i=1;i<=n;i++) if(max<a[i]) max=a[i]; return max; } int main() { int i,j,k,arr[501][501],maximum[501]; int n,m,q,count,a,b; scanf("%d%d%d",&n,&m,&q); for(i=1;i<=n;i++){ for(j=1;j<=m;j++) {scanf("%d",&arr[i][j]); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #include<string.h> int main(){ int n,d=1,m,i; char s[300][20],c[20],w[][20]={"Opened by","Closed by","Unknown"}; scanf("%d",&n); for(i=0;i<n;i++)scanf("%s",s[i]); scanf("%d",&m); while(m--){ scanf("%s",c); for(i=0;i<n&&strcmp(s[i],c);i++); printf("%s %s\n",i-n?w[d=1-d]:w[2],c);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233690/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233690/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.w = private u...
#include<stdio.h> int main(void) { char S[5]; scanf("%s",S); if(S[0]==S[1]) printf("Bad\n"); else if(S[1]==S[2]) printf("Bad\n"); else if(S[2]==S[3]) printf("Bad\n"); else printf("Good\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233733/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[8] = ""; if (scanf("%7s", S) != 1) return 1; puts(S[0] == S[1] || S[1] == S[2] || S[2] == S[3] ? "Bad" : "Good"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233777/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233777/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,x,a=0,size; scanf("%d",&n); x=n%10; n=n/10; size=2; while(n/10!=0) { if(x==n%10) { a=1; break; } else { x=n%10; n=n/10; } size++; } if(size==2)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233827/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c=0; char arr[4]; scanf("%s",arr); for(i=1; i<4; i++) { if(arr[i]==arr[i-1]) c=1; } if(c==1) printf("Bad\n"); else printf("Good\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233870/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233870/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ char s[4]; scanf("%s",s); int i,flag=0; for(i=0;i<3;i++){ if(s[i]==s[i+1]){ flag=1; } } if(flag==0)printf("Good\n"); else printf("Bad\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233913/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233913/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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]; int i,c=0; scanf("%s",s); for(i=0;i<=2;i++){ if(s[i]==s[i+1]){ c=1; break; } } if(c==0) printf("Good"); else printf("Bad"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233964/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, p, a[5] = {}; for(p = 0; p < 4; p++){ scanf("%1d", &a[p]); } for(i = 0; i < 3; i++){ if(a[i] == a[i + 1]){ printf("Bad"); return 0; } } printf("Good"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234006/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s; scanf("%d",&s); int s1=s/10; int s2=s/100; int s3=s/1000; if((s%10)==(s1%10)||(s1%10)==(s2%10)||(s2%10)==(s3%10)){ printf("Bad"); }else{ printf("Good"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234057/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234057/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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! char S[5]; int flag = 0; scanf("%s",S); for(int i = 0; i < 3 && flag == 0; i++) { if(S[i] == S[i+1]) { //printf("%c %c\n",S[i],S[i+1]); flag = 1; } } printf("%s\n", (flag == 1)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234107/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[10],i; scanf("%s",s); for(i=0;s[i+1];i++){ if(s[i]==s[i+1])break; } printf("%s\n",s[i+1]?"Bad":"Good"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234150/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; char s1[52],s2[52]; long long int sum=0; scanf("%d",&n); scanf("%s",s1); scanf("%s",s2); if(s1[0]==s2[0]){ sum=3; i=1; } else{ sum=6; i=2; } for(;i<n;i++){ if(s1[i]==s2[i]&&s1[i-1]==s2[i-1]) sum*=2; else if(s1[i]!=s2[i]&&s1[i-1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234200/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234200/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; long long s, e, m; scanf("%lld", &x); s = 1; e = 100000; //printf("[%d]\n", e); while(s < e) { m = (s + e) / 2; if(m * (m + 1) / 2 < x) s = m + 1; else e = m; } printf("%lld", s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234244/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234244/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cnt; int A[3]; int B[3]; int path[5] = {0,}; int i; for (i=0; i<3; i++) { cnt = scanf("%d %d", &A[i], &B[i]); path[A[i]]++; path[B[i]]++; } for (i=1; i<5; i++) { if (path[i] > 2) { printf("NO"); return 0; } if (path[i] == 0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234288/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234288/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <unistd.h> #include <string.h> #include <stdio.h> int main(int argc, char const *argv[]) { int a1,a2,a3,b1,b2,b3; scanf("%d %d", &a1, &b1); scanf("%d %d", &a2, &b2); scanf("%d %d", &a3, &b3); int a[6] = {a1,a2,a3,b1,b2,b3}; int n[5] = {0,0,0,0,0}; for (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234330/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234330/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,ax,ay,bx,by,cx,cy,dx,dy; double x,y,t; scanf("%d",&n); while(n--){ scanf("%d%d%d%d%d%d%d%d",&ax,&ay,&bx,&by,&cx,&cy,&dx,&dy); t=(double)((cx-ax)*(dy-cy)-(cy-ay)*(dx-cx))/(double)((bx-ax)*(dy-cy)-(by-ay)*(dx-cx)); x=ax+t*(bx-ax); y=ay+t*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234389/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void count(int N, int M){ if(!(N+M)) return; int i, j, k; int h[1500]; int w[1500]; long s_cnt = 0; int *h_cnt; int *w_cnt; for(i = 0; i < N; i++) scanf("%d", &h[i]); for(i = 0; i < M; i++) scanf("%d", &w[i]); h_cnt = (int *)calloc(1000 * N,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234431/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[200001]; scanf("%s",s); int sc=0,i,ans=0,l=0; while(s[l]!=0)l++; for(i=0;i<l;i++){ if(s[i]=='S')sc++; if(s[i]=='T'){ if(sc>0){ sc--; ans++; } } } printf("%d\n",l-2*ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } int gcd(int a,int b){ if(a<b){ swap(&a,&b); } if(b==0){ return a; } int r=a%b; while(r!=0){ a = b; b = r; r = (a%b); } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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++) int main(){ int n,m,x,c[12]={0},a[12][12]={0},y,z[12],b,d=2e9; scanf("%d%d%d",&n,&m,&x); rep(i,n){ scanf("%d",&c[i]); rep(j,m){ scanf("%d",&a[i][j]); } } rep(i,2){rep(j,2){rep(k,2){rep(l,2){rep(o,2){rep(p,...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234583/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234583/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef long long ll; int main(){ int n,m,x; int c[14]; int a[14][14]; int i,j,k,l; ll min = 100100100; int sum[14]; int flag = 0; ll value; scanf("%d %d %d", &n, &m, &x); for(i = 0;i < n;i++){ scanf("%d", &c[i]); f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234626/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234626/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #define N 100000 #define INF 0x3f3f3f3f int main() { static int aa[N]; int n, i, i_, x, a, b, c; scanf("%d", &n); a = i_ = -1; for (i = 0; i < n; i++) { scanf("%d", &aa[i]); if (a < aa[i]) { a = aa[i]; i_ = i; } } b = INF; c = -1; for (i = 0; i < n; i++) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234684/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234684/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.aa = internal global ...
#include <stdio.h> void main(){ int N,A[80]; long long G =1000,a = 0; scanf("%d",&N); for(int i = 0;i < N;i++){ scanf("%d",A+i); } for(int i = 0;i < N-1;i++){ if(A[i] < A[i+1]){ a = G/A[i]; G = G%A[i]; G = G + a*A[i+1]; } } pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234734/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234734/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i; long long int a[88]; for (i = 0; i < n; i++) scanf("%lld", &a[i]); long long int m[88], k[88], km[88]; k[0] = 0; m[0] = 1000; km[0] = 0; for (i = 0; i < n; i++) { k[i + 1] = k[i]; m[i + 1] = m[i]; km[i + 1] = km[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234778/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234778/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef long long ll; int t[100000]; int k[500007]; int main(){ ll n,m; ll p; int sp = 0; int a,i; ll ans = 1; int limit; scanf("%lld %lld", &n, &p); for(i = 0;i <= 500000;i++) k[i] = 0; if(n == 1){ printf("%lld\n", p);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234820/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234820/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> //#include <string.h> int main(void){ int n; float sum; scanf("%d", &n); //sum = a*b; if(n%2 == 0){ //sum = 1/2; printf("%f",(n/2)/(float)n); } else{ //sum = 1/n +1/2; printf("%f", (n/2+1)/(float)n); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234879/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234879/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; float m; scanf("%d",&N); if(N%2==0) { m=0.5; printf("%.10f\n",m); } else { m=((N+1)/2)/(float)N; printf("%.10f",m); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234929/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234929/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n; scanf("%d", &n); if ( n%2 == 0 ) printf("0.5\n"); else printf("%f\n", (n/2+1)/(float)n); return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234972/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234972/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,count=0; float n; scanf("%d",&a); for(i=1; i<=a; i++) { if(i%2!=0) { count++; } } n=count/(float)a; printf("%.9f\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235021/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void) { double n; scanf("%lf",&n); if ((int)n%2==0){ printf("%.10f",(n/2.0)/n); } else{ printf("%.10f",(int)(n/2.0+1)/n); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235065/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count; count=0; scanf("%d",&N); for(int x=1;x<N+1;x++) if(x%2!=0) count++; printf("%f\n",(double)count/N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() { short N; scanf("%hd",&N); float b; if(N%2==0) { b=0.5; } else { b=(float)(N/2+1)/N; } printf("%0.10f",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; double a; scanf("%d",&N); if(N%2==1){ a=(double)((N+1)/2)/(double)N; printf("%f",a); }else{ a=(double)1/(double)2; printf("%f",a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235201/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235201/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, t; float a; float p; a = 1/2; scanf("%d", &n); if (n % 2 == 0){ printf("%f\n", 0.5000000000); } else { t = n/2; a = t+1; p = a/n; printf("%f\n", p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235245/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235245/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); if(n%2==0){ printf("%f",1/2.0); return 0; } else{ printf("%f",(n/2+1.0)/n); return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235296/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N, a[3001]; long long dp[3002][3002] = {}; long long recursion(int l, int r) { if (dp[l][r] != 0 || l > r) return dp[l][r]; long long tmp[2] = {a[l] - recursion(l + 1, r), a[r] - recursion(l, r - 1)}; dp[l][r] = (tmp[0] > tmp[1])? tmp[0]: tmp[1]; return dp[l][r]; } int main() { int i; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dp = dso_local local_unnam...
// AOJ 2473 Poor Computer // 2018.2.1 bal4u #include <stdio.h> #define MAX 42 typedef struct { long long s; int k; } Q; Q q[10000]; int top; int lim; long long goal; //#define getchar_unlocked() getchar() int in() { int n = 0; int c = getchar_unlocked(); do n = (n<<3)+(n<<1) + (c & 0xf), c = getchar_unlocked()...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235397/source.c" target datalayout = "e-m:e-p270: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.Q = type { i64, i32...
#include <stdio.h> #include<string.h> #include<stdlib.h> int main(void){ // Your code here! int n; scanf("%d",&n); int a[n]; long long sum=0; for(int i=0;i<n;i++){ scanf("%d",&a[i]); } for(int i=1;i<n;i++){ while(1){ if(a[i-1]>a[i]){ a[i]++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235447/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&a); int t=0,i; //long int b[a],k=0; long int b[200000],k=0; //int b[1500000],k=0; for(i=0;i<a;i++){ scanf("%ld",&b[i]); if(t<b[i]) t=b[i]; else k+=t-b[i]; } printf("%ld",k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235498/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235498/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(x,y) x>y?x:y int main() { int n; // int n = 5; scanf("%d\n", &n); long long int a[n]; // long long int a[] = {2, 1, 5, 4, 3}; rep(i,n){ scanf("%lld\n", &a[i]); } long long int res = 0, mx = -1; rep(i,n){ res += ma...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235540/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235540/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } int gcd(int a,int b){ if(a<b){ swap(&a,&b); } if(b==0){ return a; } int r=a%b; while(r!=0){ a = b; b = r; r = (a%b)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235584/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235584/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&n); long int a[n],sum=0; for(i=0;i<n;i++){ scanf("%ld",&a[i]); } for(i=0;i<n-1;i++){ if(a[i]>a[i+1]){ sum += a[i]-a[i+1]; a[i+1] += a[i]-a[i+1]; } } printf("%ld",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235627/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235627/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n; scanf("%d", &n); int i; long long int a[200005]; for (i = 0; i < n; i++) scanf("%lld", &a[i]); long long int ans = 0; for (i = 1; i < n; i++) { if (a[i - 1] > a[i]) { ans += a[i - 1] - a[i]; a[i] = a[i - 1]; } } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235670/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235670/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,B,C,D; char S[200005]; int i,j; scanf("%d %d %d %d %d",&N,&A,&B,&C,&D); scanf("%s",&S); for(i=A;i<C-1;i++) { if((S[i]=='#')&&(S[i+1]=='#')) { printf("No\n"); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235713/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235713/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 check(void); int check_2(void); char step[200002]; int n,a,b,a_end,b_end; int main(void){ int i,flg,flg_2; for(i=0;i<200002;i++){ step[i]=0; } scanf("%d %d %d %d %d",&n,&a,&b,&a_end,&b_end); scanf("%s",step); a--; b--; a_end--; b_end--; flg=0; fl...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235757/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @step = dso_local global [2...
#include<stdio.h> int main(){ int n; char s[50+1]; int count=0; scanf("%d",&n); scanf("%s",s); for(int i=0;i<n;i++){ if((s[i]=='A')&&(s[i+1]=='B')&&(s[i+2]=='C')){ count=count+1; }else{ } } printf("%d\n",count); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235858/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235858/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c = 0; int i; char s[51]; scanf("%d",&n); scanf("%s",s); for (i = 0;i < n-2;i++){ if(s [i] == 'A' && s[i+1] == 'B' && s[i+2] == 'C') c++;} printf("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235900/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235900/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count=0; scanf("%d",&N); char s[N]; scanf("%s",s); for(i=0;i<=N;i++){ if(s[i]=='A'){ if(s[i+1]=='B'){ if(s[i+2]=='C'){ count=count+1; } } } } printf("%d",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235944/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235944/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cnt=0; char s[100]; scanf("%d %s",&n,s); for(int i=0;i<n;i++){ if(s[i]=='A'&&s[i+1]=='B'&&s[i+2]=='C'){ cnt++; } } printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235988/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 k; int x; scanf("%d %d %d\n",&n,&k,&x); int arr[n]; for(int i=0;i<n;i++) { scanf("%d",&arr[i]); } printf("\n"); int sum=k*x; for (int i = 0;i <n-k ; i++) { sum+=arr[i]; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23603/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23603/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main() { int n; int i, ans = 0; scanf ("%d\n", &n); char s[n]; scanf ("%s", s); for (i = 0; i < n - 2; i++) { if (s[i] == 'A' && s[i + 1] == 'B' && s[i + 2] == 'C') ans++; } printf ("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236073/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236073/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 kitamuraeri(int mimorisuzuko[30], int tokuisora) { static const int asumikana[4][10] = { { 1, 4, 7, 10, 16, 24, 27, 30, 21, 18}, { 7, 8, 9, 13, 10, 22, 23, 24, 18, 12}, { 9, 6, 3, 19, 13, 28, 25, 22, 12, 15}, { 3, 2, 1, 16, 19, 30, 29, 28, 15, 21} }; int kugimiyarie; for (k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236123/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @kitamuraeri.asumikana = in...
#include <stdio.h> void phouse(int s[15][10]) { int i,j; for (i=0;i<15;i++) { for (j=0; j<10;j++) { if (i%4==3) printf("##"); else printf(" %d",s[i][j]); } printf("\n"); } } int main(void) { int house[15][10] = {{0}}; int n,b,f,r,v; s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236167/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236167/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, Btou, Fkai, Rban, Vnin; int array[5][4][11] = {0}; int i, j, k; scanf("%d", &N); for (i = 0; i < N; ++i){ scanf("%d %d %d %d", &Btou, &Fkai, &Rban, &Vnin); array[Btou][Fkai][Rban] += Vnin; } for (i = 1; i < 5; ++i){ for (j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236217/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,i,j,k,l,m,n,o,p,q,r,s; int joho[4][3][10]; for(i=0;i<4;i++){ for(s=0;s<3;s++){ for(m=0;m<10;m++){ joho[i][s][m]=0; } } } scanf("%d",&n); for(h=0;h<n;h++){ scanf("%d %d %d %d",&a,&b,&c,&d); joho[a-1][b-1][c-1]+=d; } for(i=0;i<4;i++){ for(s=0;s<3;s++){ for(m=0;m<10;m++){ printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236260/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b,f,r,v; int n,i,j,k; int dome[4][3][10] = {0}; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d %d",&b,&f,&r,&v); dome[b-1][f-1][r-1] += v; } for(i=0;i<4;i++) { for(j=0;j<3;j++) { for(k=0;k<10;k++) { printf(" %d",dome[i][j][k]); } print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236310/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 house[4][3][10] = {0}; int b,f,r,v; int i,j,k; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d %d %d %d", &b,&f,&r,&v); house[b-1][f-1][r-1] += v; } for(i=0; i<4; i++){ for(j=0; j<3; j++){ for(k=0; k<10; k++){ printf(" %d",house[i][j][k]); } printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236354/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> // printf(), scanf() int main(int argc, char** argv) { int room[4][3][10]; int b, f, r, v; int n; int i; for (b = 0; b < 4; ++b) { for (f = 0; f < 3; ++f) { for (r = 0; r < 10; ++r) room[b][f][r] = 0; } } scanf("%d\n", &n); for (i = 0; i < n; ++i) { scanf("%d %d %...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236398/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 rooms[4][3][10] = {0}; int n; int i, j, k; int b, f, r, v; scanf("%d", &n); for (i = 0; i < n; ++i) { scanf("%d %d %d %d", &b, &f, &r, &v); // printf("%d %d %d %d", b, f, r, v); rooms[b-1][f-1][r-1] += v; } for (i = 0; i < 4; ++i) { for (j = 0; j < 3; ++j) { for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236440/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236440/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count[4][3][10]={0}; int n, b, f, r, v, i, j, k; scanf("%d",&n); for(i=0; i<n; i++){ scanf("%d %d %d %d", &b, &f, &r, &v); count[b-1][f-1][r-1]+=v; } for(i=0; i<4; i++){ for(j=0; j<3; j++){ fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236484/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236484/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b = 0; int f = 0; int r = 0; int v = 0; int n = 0; int i = 0; int j = 0; int k = 0; unsigned int room[4][3][10]; for(i = 0; i < 4; i++) { for(j = 0; j < 3; j++) { for(k = 0; k < 10; k++) { room[i][j][k] = 0; } } } scanf("%d", &n); for(i = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236534/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236534/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b,f,r,v; int count[4][3][10]={0}; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d %d %d",&b,&f,&r,&v); count[b-1][f-1][r-1]+=v; } for(b=0;b<4;b++){ for(f=0;f<3;f++){ for(r=0;r<10;r++){ printf(" %d",count[b][f][r]); } printf("\n"); } if(b<4-1){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236578/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236578/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, b, f, r, v; int a[4][3][10] = {0}; scanf("%d", &n); for(int i = 0; i < n; i++){ scanf("%d %d %d %d", &b, &f, &r, &v); a[b - 1][f - 1][r - 1] += v; } for(int j = 0; j < 4; j++){ for(int k = 0; k < 3; k++){ for(int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,j,k; int x; int count[4][3][10]; for(i=0;i<4;i++){ for(j=0;j<3;j++){ for(k=0;k<10;k++) count[i][j][k]=0; } } scanf("%d",&n); for(l=1;l<=n;l++) { scanf("%d %d %d %d",&i,&j,&k,&x); count[i-1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b,f,r,v,h[5][4][11]={},i,j,k,l; scanf("%d",&n); for(l=1;l<=n;l++){ scanf("%d %d %d %d",&b,&f,&r,&v); for(i=1;i<=4;i++){ for(j=1;j<=3;j++){ for(k=1;k<=10;k++){ if((b==i && f==j) && r==k){ h[i][j][k]+=v; } } } } } for(i=1;i<=4;i++){ for(j=1;j<...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236721/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236721/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 BUILDINGS 4 #define FLOORS 3 #define ROOMS 10 void priHouse(const int [BUILDINGS][FLOORS][ROOMS]); int main(void) { int house[BUILDINGS][FLOORS][ROOMS] = {}; int n, building, floor, room, people; scanf("%d", &n); while (n--) { scanf("%d %d %d %d", &building, &floor, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236765/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236765/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...