Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> /*#include<math.h> #include<string.h> #include<stdlib.h> int cnm(void const *a,void const *b) { return *(int *)b-*(int *)a; } typedef struct huffman{ int data; struct huffman *lchild,*rchild,*prent; }man,*huff;*/ int main() { int a,b,c,d,e,f; scanf("%d",&a); while(a--) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28366/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int n,a,b,c,d; scanf("%d %d %d %d %d",&n,&a,&b,&c,&d); if((a+b)*n>=(c-d) && (a-b)*n<=(c+d)) printf("Yes\n"); else printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28371/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28371/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define 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(){ ll w,a,b; scanf("%lld%lld%lld",&w,&a,&b); printf("%lld",a+w<b?b-(a+w):b+w<a?a-(b+w):0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283753/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283753/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b; scanf("%d %d %d", &W, &a, &b); if(a+W <= b) { printf("%d", b - (a+W)); } else if((b <= (a+W) && (a+W) <= (b+W)) || (b <= (a+W) && a <= b)){ printf("0"); } else { printf("%d", a - (b+W)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283797/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283797/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int T; scanf("%d",&T); while(T--) { int a,b,c,d,n; scanf("%d%d%d%d%d",&n,&a,&b,&c,&d); if((n*(a+b)<c-d)||(n*(a-b)>c+d)) printf("NO\n"); else printf("YES\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28384/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28384/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 Min(int,int); int main(){ int n,i,j,k,l; int f[101],s[101][101]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d %d",&f[i-1],&f[i]); } for(i=1;i<=n;i++){ s[i][i]=0; } for(l=2; l<=n; l++){ for(i=1; i<=n-l+1; i++){ j=i+l-1; s[i][j]=1E+9; for(k=i; k<=j-1;k+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> static int N =100; int min(int, int); int main(){ int n, p[N+1], m[N+1][N+1]; scanf("%d",&n); for(int i=1; i<= n; i++){ scanf("%d%d",&p[i-1], &p[i]); } for(int i=1; i<=n; i++) m[i][i]=0; for(int l=2; l <= n; l++){ for(int i=1; i<=n-l+1; i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283926/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283926/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t; scanf("%d",&t); int k=0; while(k<t) { int n,a,b,c,d; scanf("%d",&n); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); if((n*(a-b)<=(c+d))&&(n*(a+b)>=(c-d))) printf("Yes\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28397/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <limits.h> int n; void calculate(int **M, int **cost, int width); int main(int argc, char *argv[]) { int i, j; int **M; int **cost; scanf("%d", &n); M = (int **)malloc(sizeof(int *) * (n + 1)); for (i = 1; i <= n; i++) M[i] = (int *)malloc(sizeof(int) * 2)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284033/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 100 #define INF 100000 int main(){ int i,j,l,m[N+1][N+1],n,p[N+1],k,r; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d%d",&p[i-1], &p[i]); } for(i=1;i<=n;i++){ m[i][i] = 0; } for(l=2;l<=n;l++){ for(i=1;i<=n-l+1;i++){ j = i+l-1; m[i][j] = INF; for(k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284084/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284084/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 INF (1<<21) #define N 100 int main(){ int i,j,k,l,n; int p[N+1],m[N+1][N+1]; scanf("%d",&n); for(i=1; i<=n; i++) scanf("%d %d",&p[i-1],&p[i]); for(i=1; i<=n; i++) m[i][i] = 0; for(l=2; l<=n; l++){ for(i=1; i<=n-l+1; i++){ j = i+l-1; m[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284134/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284134/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define MAX 100 int main() { int i,j,a,b,n,g[MAX], m[MAX][MAX],u; scanf("%d",&n); for (i=1;i<=n;i++){ scanf("%d%d",&g[i-1],&g[i]); } for(i=1;i<=n;i++) m[i][i]=0; for(b=2;b<=n;b++) { for(i=1;i<=n-b+1;i++) { j=i+b-1; m[i][j]=10000000; for (a=i;a<=j-1;a++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284178/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284178/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<limits.h> #define UD -1 #define SIZE 100 int memo[SIZE][SIZE]; int r[SIZE]; int c[SIZE]; void init(){ int i, j; for( i = 0; i < SIZE; i++ ){ for( j = 0; j < SIZE; j++ ){ memo[i][j] = UD; } } } //M_a??¨M_b??????????????§??????????????°????±?????????¢??°??? int get(int a, int b){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284220/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284220/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @memo = dso_local local_unn...
#include <stdio.h> #define N 100 #define INF 100000 int min(int a,int b){ if(a < b) return a; else return b; } int main(){ int i,l,j,k,n,p[N + 1],m[N + 1][N + 1]; scanf("%d",&n); for(i = 1;i <= n;i++) scanf("%d %d",&p[i - 1],&p[i]); for(i = 1;i <= n;i++) m[i][i] = 0; for(l = 2;l <= n;l++){ for(i = 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284264/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 INF 1000000000 int matrixChainOrder(int *,int); int min(int,int); int p[101]; int m[101][101]; int main(){ int n,i,cos,b; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d %d",&p[i-1],&p[i]); } cos=matrixChainOrder(p,n); printf("%d\n",cos); return 0; } int matrixChainOrder(int *p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284307/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284307/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ ALDS1_10_B Matrix Chain Multiplication // 2018.4.30 bal4u #include <stdio.h> #include <string.h> #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() { int n = 0, c = gc(); do n = 10*n + (c & 0xf), c = gc(); while (c >= '0'); return n; } #define MAX_RC 102 #define INF 0x303030...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i...
#include<stdio.h> static int N = 100; int main(){ int n,i,j,k,l,min; int r[N+1],c[N+1],m[N+1][N+1]; scanf("%d",&n); for(i = 1; i <= n; i++){ scanf("%d%d",&r[i],&c[i]); } for(i = 1; i <= n;i++)m[i][i] = 0; for(l = 2; l <= n; l++){ for(i = 1; i<=n-l+1;i++){ j = i + l - 1; m[i][j] = 10000000; for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284408/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284408/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define SIZE 101 #define INF 1000000 int main(){ int i,j,k,l,n,M[SIZE][SIZE],P[SIZE]; scanf("%d", &n); for(i = 0; i < n; i++) scanf("%d%d", &P[i], &P[i+1]); for (i = 1; i <= n; i++) M[i][i] = 0; for (l = 2; l <= n; l++) { for (i = 1; i <= n - l + 1; i++) { j = i + l - 1;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 INF 10000000; int sum,i,j,k; int matrixChainMultiplication(int p[],int n){ int m[n+1][n+1]; for(i=1;i<=n;i++) m[i][i]=0; for(int l=2;l<=n;l++){ for(i=1;i<=n-l+1;i++){ j=i+l-1; m[i][j]=INF; for(k=i;k<j;k++){ sum = m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]; if(m[i][j] >...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284495/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284495/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @i = dso_local local_unname...
#include<stdio.h> #define N 100 int main() { int p[N+1],m[N+1][N+1],a,q,l,j,k,i,t; // float inf = INFINITY; scanf("%d",&a); for(i=1;i<=a;i++) { scanf("%d %d",&p[i-1],&t); } p[a]=t; for(i=1;i<=a;i++)m[i][i]=0; for(l=2;l<=a;l++){ for(i=1;i<a-l+2;i++) { j=i+l-1; m[i][j]=1000000; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284538/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284538/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int i,j,k,q,n,l,m[101][101],p[101]; scanf("%d",&n); for(i=1;i<=n;i++)scanf("%d%d",&p[i-1],&p[i]); for(i=1;i<=n;i++)m[i][i]=0; for(l=2;l<=n;l++){ for(i=1;i<=n-l+1;i++){ j=i+l-1; m[i][j]=10000000; for(k=i;k<=j-1;k++){ q=m[i][k]+m[k+1][j]+p[i-1]*p[k]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284581/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284581/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 100 int main(){ int i,j,k,l,n,p[N+1],m[N+1][N+1]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d%d",&p[i-1],&p[i]); } for(i=1;i<=n;i++){ m[i][i]=0; } for(l=2;l<=n;l++){ for(i=0;i<=n-l+1;i++){ j=i+l-1; m[i][j]=(1<<21); for(k=i;k<=j-1;k++){ if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284624/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284624/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[100], m[100][100], n, i, j, k, l, o; scanf("%d", &n); for(i = 1; i <= n; i++){ scanf("%d%d", &p[i-1], &p[i]); } for(i = 1; i <= n; i++){ m[i][i] = 0; } for(l = 2; l <= n; l++){ for(i = 1; i <= n - l + 1; i++){ j = i + l - 1; m[i][j] = 1000000; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 101 int main(){ int i,j,k,r,c,l,n,q; int m[MAX][MAX],p[MAX]; scanf("%d",&n); for(i = 1; i <= n; i++){ scanf("%d%d",&r,&c); if(i == 1) p[0] = r; p[i] = c; } for(i = 1; i <= n; i++) m[i][i] = 0; for(l = 2; l <= n; l++){ for(i = 1; i <= n-l+1; i++){ j ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284718/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 r[101], a[101][101] = { 0 }; int i, j, k, l, m, n, cmin = 0; scanf("%d", &n); for (i = 1;i <= n;i++) { scanf("%d %d", &r[i], &r[i + 1]); } for (i = 1;i <= n;i++) { a[i][i] = 0; } for (l = 1;l <= n; l++) { for (i = 1;i <= n - l;i++) { j = l + i; cmin = a[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284761/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284761/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 S 100 int main(){ int i,j,n,x,y; int r[S+1],m[S+1][S+1]; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%d%d",&r[i-1],&r[i]); } for(i=0;i<=n;i++){ m[i][i]=0; } for(x=2;x<=n;x++){ for(i=0;i<=n-x+1;i++){ j=i+x-1; m[i][j]=(1<<21); for(y=i;y<=j-1;y++) if(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284804/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284804/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> int main(){ int N,A=-1,F,T=-1,X,Y; int D[2]={-1,-1},S[2]; for(scanf("%d",&N);N--;){ int f,a,t,x,y; scanf("%d%d%d%d%d",&f,&a,&t,&x,&y); if(t==T&&A!=a){ int z=(X-x)*(X-x)+(Y-y)*(Y-y); if(D[t]<z)D[t]=z,S[t]=f-F; if(D[t]==z&&S[t]>f-F)S[t]=f-F; } F=f,A=a,T=t,X=x,Y=y...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284848/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284848/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a,&b,&c); if(a>b){ d=a; a=b; b=d; } if(b>c){ d=b; b=c; c=d; } if(a>b){ d=a; a=b; b=d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284891/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284891/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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_int(const void *a, const void *b) { if (*(int *)a > *(int *)b) return 1; if (*(int *)a < *(int *)b) return -1; return 0; } int main() { int n[3]; scanf("%d %d %d", &n[0], &n[1], &n[2]); qsort((void *)n, 3, sizeof(n[0]), cmp_int); printf("%d %d %d\n", n[0], n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284934/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284934/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i; scanf("%d %d %d", &a, &b, &c); if (a>b) { i=a; a=b; b=i; } if (b>c) { i=b; b=c; c=i; } if (a>b) { i=a; a=b; b=i; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284978/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main (int argc, char* argv[]) { int array[3], temp, i, j; scanf("%d %d %d", &array[0], &array[1], &array[2]); for(i=2; 0<i; i--) { for(j=0; j<i; j++) { if(array[j+1] < array[j]) { temp = array[j]; array[j] = array[j+1]; array[j+1] = temp; } } } printf("%d %d ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285027/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3],i,j,temp; scanf("%d %d %d",&a[0],&a[1],&a[2]); for(i=1; i<3; ++i){ for(j=2; j>=i; --j){ if(a[j-1]>a[j]){ temp=a[j-1]; a[j-1]=a[j]; a[j]=temp; } } } printf("%d %d %d\n",a[0],a[1],a[2]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285070/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ARRAY_SIZE 3 int int_cmp(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main() { int L[ARRAY_SIZE]; scanf("%d %d %d", &L[0], &L[1], &L[2]); qsort(L, ARRAY_SIZE, sizeof(int), int_cmp); printf("%d %d %d\n", L[0], L[1], L[2]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285113/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int t; scanf("%d %d %d",&a,&b,&c); if(b>c){ t = c; c = b; b = t; } if(a>b){ t = b; b = a; a = t; } if(b>c){ t = c; c = b; b = t; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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",&a); scanf("%d",&b); if(a>b){ a+=b; b=a-b; a-=b; } scanf("%d",&c); if(b>c){ b+=c; c=b-c; b-=c; } if(a>b){ a+=b; b=a-b; a-=b; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285221/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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%d%d",&a,&b,&c); if(a <= b && b <= c ){ printf("%d %d %d\n",a,b,c); } else if(a <= c && c <= b){ printf("%d %d %d\n",a,c,b); } else if(b <= a && a <= c){ printf("%d %d %d\n",b,a,c); } else if(b <= c && c <= a){ pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285272/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,l,i,j; scanf("%d %d",&n,&l); char str1[n][l+1]; for(i=0;i<n;i++) { scanf("%s",&str1[i]); } for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(strcmp (str1[i],str1[j])>0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285322/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> int cmp_str(const void* left,const void* right){ char *left_char=(char *)left; char *right_char=(char *)right; return strcmp(left_char,right_char); } int main(){ int N=0,L=0; char S[100][101]={""}; scanf("%d %d",&N,&L); for(int i=0;i<N;i++) sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285366/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* * pr2_main.c * * Created on: 2020/02/04 * Author: 113207 */ /* * https://atcoder.jp/contests/abc042/tasks/abc042_b */ #include <stdio.h> #include <string.h> int main(void) { unsigned int n; unsigned int l; scanf("%d %d", &n, &l); char str[n][l+1]; char tmp[l+1]; //char cat_str = '\0'; int i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,l,i,j; char s[101][101]; char tmp[101]; scanf("%d%d",&n,&l); for(i=0;i<n;i++) scanf("%s",s[i]); for(i=0;i<n;i++){ for(j=i+1;j<n;j++){ if(strcmp(s[i],s[j])>0){ strcpy(tmp,s[i]); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285452/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, L; int i, j; scanf("%d %d", &N, &L); char S[N][128]; char temp[128]; for(i = 0; i < N; i++){ scanf("%s", S[i]); } for(i = 1; i < N; i++){ for(j = 1; j < N; j++){ if(strcmp(S[j - 1], S[j]) > 0){ strcpy(temp, S[j - 1]); st...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> static char s[100001]; static int n, l; static int f_cmp(const void *a, const void *b) { int i, j; for (i = 0; i < l; ++i) { if (j = *((char *)a + i) - *((char *)b + i)) return j; } return 0; } int main(void) { int i; scanf("%d%d", ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdint.h> #include<stdbool.h> #include<tgmath.h> #include<time.h> #define ll long long #define min(a,b) ((a)>(b)?(b):(a)) #define max(a,b) ((a)>(b)?(a):(b)) #define miin(a,b,c) min((a), min((b), (c))) #define maax(a,b,c) max((a), max((b), (c))) char s[11...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285582/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @s = dso_local global [1111...
#include<stdio.h> #include <stdlib.h> #include <string.h> #define MAX 1000 int top; int S[MAX]; int initialize(){ return top=0; } int isempty(){ return top==0; } int isfull(){ return top>=MAX-1; } void push(int n){ if (isfull()){printf("overflow\n");exit(1);} ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285632/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
/* * Stack.c * * Created on: 2015/02/14 */ #include <stdio.h> #include <stdlib.h> #include <string.h> int stack[100]; int count = 0; int pop(){ count--; return stack[count]; } void push(int n){ stack[count]=n; count++; } int main(void){ int x,n,m; char s[100]; while(scanf("%s",s)!= EOF){ if(s[0]=='+...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285676/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_un...
#include <stdio.h> #include<stdlib.h> #include <string.h> #define DEF_ELM_MAX 200 static int top; static int S[DEF_ELM_MAX]; void initialize( void ) { top = 0; } void push(int x) { if(top == DEF_ELM_MAX-1) { // overflow return; } S[top++] = x; } int pop( void ) { if(top == 0) { // underflow return -1;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285748/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285748/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = internal unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <math.h> #define MAXOP 100 #define NUMBER '0' int getop(char []); void push(double); double pop(void); int main(){ int type; double op2; char S[MAXOP]; while((type = getop(S)) != EOF) { switch (type) { case NUMBER: push(atof(S)); break; case '+': pu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285805/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.1 = private unnamed_a...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100 int top=0, s_array[1000]; void push( int num) { top++; s_array[top] = num; } int pop( void) { top--; return s_array[top+1]; } int main() { int i=0, j=1, number, num1, num2; char array[MAX], one_num[9]; while(1){ if( scanf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285849/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #define MAX 1000 void push(int); int pop(); void initialize(); int isEmpty(); int isFull(); int S[MAX]; int top; int main() { int i=0,j,num=0, work1, work2; char input[10]; while(scanf("%s", input) != EOF){ switch (input[0]) { case '+' : work1 = pop(); work...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285892/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #include <assert.h> #define min(a,b) ((a)<(b) ? (a):(b)) #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) char out[50000010][2], dp[50000010][2]; int n, m, ar[1010][1010], temp[1010][1010]; void copy(){ int i, j; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28595/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0, ...
#include<stdio.h> int main() { int i,a,t,q,b[101],n,w; scanf("%d",&t); while(t!=0) { scanf("%d",&n); w=0; q=0; for(i=0; i<n; i++) { scanf("%d",&a); if(a%2==0) w=i+1; else { b[q]=q+1;q++;} } if(w!=0) {printf("1\n"); printf("%d\n",w);} else {if(q==1) printf("-1\n"); else { printf("2\n"); printf...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2860/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr co...
#include <stdio.h> #include <stdlib.h> void push(int); int pop(void); int list[100], top = 0; int main(){ int a, b; char str[6]; while(1){ if(scanf("%s", str) == EOF) break; if(str[0] == '+'){ a = pop(); b = pop(); push(a+b); } else if(str[0] == '-'){ a = pop(); b = pop(); push(b-a); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286042/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #include<string.h> int top; int C[2]; int pop(void); void push(int); int main(){ int a,b,x,n; char s[100]; while(1){ n = scanf("%s",s); if(n == EOF)break; switch(s[0]){ case '+': a = pop(); b = pop(); push(b+a); break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286086/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAX 100 void push(int ); int pop(void ); int S[MAX]; int top = 0; int main() { char kari[MAX]; int i=0,a; while(scanf("%s",kari) != EOF) { if(kari[0] == '+') { push(pop() + pop()); } else if ( kari[0] == '-' ){ a = pop(); push(p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286129/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> #include <string.h> int top, S[1000]; void push(int x){ top++; S[top] = x; } int pop(){ top--; return S[top+1]; } int main(void) { int a,b; top=0; char s[100]; while( scanf("%s",s) != EOF){ if( s[0]=='+'){ a = p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286187/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286187/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> int main() { int x,y,z,i,j,k,a,b,c,n,m,t, mat[1010]; scanf("%d",&t); while(t--) { scanf("%d",&n); for(x = 0; x < n; x++) scanf("%d",&mat[x]); printf("%d\n",3*n); for(x = 0; x < n; x+=2) for(y = 0; y ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28623/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28623/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> typedef struct _data{ int value; struct _data *next; } data; void push(data **p, int val) { data *d = (data*)malloc(sizeof(data)); d->value = val; d->next = *p; *p = d; } int pop(data **p) { int val = (*p)->value; data *w = *p; *p = (*p)->next; free(w); return val; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286280/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286280/source.c" target datalayout = "e-m:e-p270: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 { i32,...
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; void push(int x) { // top を加算してからその位置へ挿入 S[++top] = x; } int pop() { top--; // topが指していた要素を返す return S[top+1]; } int main() { int a, b; top = 0; char s[100]; while( scanf("%s", s) != EOF ) { if ( s[0] == '+' ) { b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286338/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <string.h> int top, S[1000]; void push(int v) { S[++top] = v; } int pop() { top--; return S[top + 1]; } int main() { char a[100]; top = 0; int op1, op2; while (scanf("%s", a) != EOF) { if (a[0] == '+') { op1 = pop(); op2 = pop(); pus...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286396/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> #include <string.h> int t=0,p[1000]; void push(int a){ p[++t]=a; } int pop(){ t--; return p[t+1]; } int main(){ int x,y; char q[100]; while(scanf("%s",q)!=EOF){ if(q[0]=='+'){ x=pop(); y=pop(); push(y+x); } else if(q[0]=='-'){ x=pop(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286453/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286453/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @t = dso_local local_unname...
#include<stdio.h> #include<stdlib.h> int stack[110]; int top=0; void push(int x){ top += 1; stack[top]=x; } int pop(){ top -= 1; return stack[top+1]; } int main(){ char c[110]; int a,b; while(scanf("%s",c)!=EOF){ switch(c[0]){ case '+': b=pop(); a=pop(); push(a+b); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286497/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286497/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> #include <stdlib.h>//atoi 文字列の数字をint型の数値にする #include <string.h> int top,S[1000]; int push(int x){ S[++top]=x; //notS[top++] sがゼロの時に処理してしまうから } int pop(){ top--; return S[top+1]; } int main(){ int a,b; top = 0; char s[100]; while(scanf("%s",s)!=EOF){ if(s[0] == '+'){ a = p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286547/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286547/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include<stdio.h> #include<stdlib.h> int c[199]; int number=0; void push(int x){ number++; c[number]=x; } int pop(){ number--; return c[number+1]; } int main(){ char s[199]; int x,y; while(scanf("%s",s)!=EOF){ switch(s[0]){ case '+': push(pop()+pop()); break; case '*': pu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286598/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286598/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @number = dso_local local_u...
#include<stdio.h> #include<stdlib.h> int pop(); void push(int); int stack[1000]; int ppp=0; void push(int o){ stack[ppp++]=o; } int pop(){ if(ppp<=0)return 0; return stack[--ppp]; } int main(){ int o,k=0,Ans,a,b; char t[100]; while(scanf("%s",t)!=EOF){ if(t[0]=='+'){ a=pop(); b=pop(); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286640/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286640/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ppp = dso_local local_unna...
#include <stdio.h> #include <ctype.h> #include <string.h> #define MAX 100 int calc(char,int,int); int ctoi(char*); int main() { char s[MAX]; int array[MAX] , pos = 0 , a , b , res; memset(array,-1,sizeof(array)); while ( scanf("%s" ,s) != EOF ) { if (!isdigit(s[0])) { a = array[pos-2]; array[pos-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286684/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286684/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 100 int pop(void); void push(int); int stackPointer=0; int stack[N]; int main(){ int x=0,n,y=0; char s[N]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ x=pop(); y=pop(); push(x+y); } else if ( s[0] == '-' ){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286741/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286741/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stackPointer = dso_local l...
#include <stdio.h> #include <stdlib.h> #include <string.h> int top = 0, S[1000]; void push(int x) { S[++top] = x; } int pop(void) { top--; return S[top+1]; } int main(void) { int a, b; top = 0; char s[100]; while(scanf("%s",s) != EOF) { if(s[0] == '+') { a = pop(); b = pop(); pus...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286785/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286785/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #include<string.h> int top, S[1000]; int pop(){ return S[top--]; } void push(int x){ S[++top] = x; } int main(){ int a, b; top = 0; char s[100]; while (scanf("%s", s) != EOF){ if (s[0] == '+'){ a = pop(); b = pop(); push(a+b); } else if (s[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286828/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286828/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
#include <stdio.h> #include <stdlib.h> typedef struct node{ struct node *next; int value; }Node; Node *head = NULL; int pop(){ if( head == NULL) exit( 1 ); Node *tmp = head; int value = tmp -> value; head = head -> next; free( tmp ); return value; } void push( int value ){ Node *node = ( Node ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286879/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286879/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> void push(int); int pop(void); int top,S[1000]; int main(){ int a,b; top=0; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ a=pop(); b=pop(); push(a+b); } else if ( s[0] == '-' ){ b=pop(); a=p...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286936/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include <stdio.h> #include <stdlib.h> int top,a[1000]; int pop(void); void push(int); int main() { int x,y; char str[100]; top = 0; while(scanf("%s", str) !=EOF ) { if(str[0]=='+') { x = pop(); y = pop(); push(x+y); } else if(str[0]=='-') { x = pop(); y = pop(); push(y-x...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286987/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286987/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> int top=0; int a[100]; void push(int); int pop(void); int main() { int tmp1,tmp2; char s[100]; while(scanf("%s",s) != EOF) { if(s[0] == '+') { tmp1 = pop(); tmp2 = pop(); push(tmp1+tmp2); // printf("%d",S[top]); } else if(s[0] ==...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287036/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287036/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> int h[200005], l; void f1(int n) { h[l] = n; int now = l; l++; while (now > 0) { if (h[(now - 1) / 2] > h[now]) { int f = h[now]; h[now] = h[(now - 1) / 2]; h[(now - 1) / 2] = f; } now = (now - 1) / 2; } return; } int f2() { int res = h[0]; l--; h[0] = h[l]; int now = 0; f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28708/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @h = dso_local local_unnamed_...
#include<stdio.h> #include<stdlib.h> int main(){ int x,y[100],j=0; char s[100]; while( scanf("%s", s) != EOF ){ if ( s[0] == '+' ){ y[j-2]=y[j-2]+y[j-1]; j--; } else if ( s[0] == '-' ){ y[j-2]=y[j-2]-y[j-1]; j--; } else if ( s[0] == '*' ){ y[j-2]=y[j-2]*y[j-1]; j--; } else ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287122/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ ALDS1_3_A Stack // 2018.4.27 bal4u #include <stdio.h> #include <ctype.h> int stack[102]; int top; char buf[2000]; int main() { int v1, v2; char *p; fgets(p=buf, 500, stdin); top = 0; while (*p >= ' ') { while (isspace(*p)) p++; if (isdigit(*p)) { v1 = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287166/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287166/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @buf = dso_local global [20...
#include <stdio.h> #include <stdlib.h> void push(int x); int pop(); int S[100]; int top = 0; int main(void) { char s[100]; while(scanf("%s",s) != EOF){ int a = 0,b = 0; switch(s[0]){ case '+': a = pop(); b = pop(); push(a+b); break; case '-': a = pop(); b = pop(); push(b-a); break...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287209/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287209/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(){ int top,operand[101],v; char s[200]; top = 0; while(scanf("%s",s) != EOF){ if(top > 101)break; if(s[0] == '+'){ if(top < 2)continue; else if(top >= 2){ v = operand[top-1]; operand[top-1] = v + ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287252/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287252/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <ctype.h> int stack[102]; int top; char buf[2000]; int main() { int v1, v2; char *p; fgets(p=buf, 500, stdin); top = 0; while (*p >= ' ') { while (isspace(*p)) p++; if (isdigit(*p)) { v1 = 0; while (isdigit(*p)) v1 = 10*v1 + ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287296/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @buf = dso_local global [20...
#include <stdio.h> #include <stdlib.h> int f[50]; int top=0; void push(int); int pop(void); int main() { int x,a,b; char c[10]; while(scanf("%s",c)!=EOF) { if(c[0]=='+') { a=pop(); b=pop(); push(a+b); } else if(c[0]=='-') { a=pop(); b=pop(); push(b-a); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @top = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> #define MAX 200 int isEmpty(); int ifFull(); void push(int); int pop(); int g_top = 0; int g_s[100]; int main(){ int x,a,b; char s[100]; while(scanf("%s",s) != EOF){ switch(s[0]){ case '+': a = pop(); b = pop(); push(b+a); break; case '...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287382/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287382/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @g_top = dso_local local_un...
#include<stdio.h> #include<string.h> #include<stdlib.h> #define N 100 #define MAX 1000001 int main(){ int i,j,ntop=0,otop=0, num[N],top=0; char str[MAX],c; while(1){ scanf("%s",str); if(str[0]>='0'&&str[0]<='9') num[ntop++]=atoi(str); else{ if(str[0]=='+') num[ntop-2]=num[ntop-2]+num[nt...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287432/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287432/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 top, S[101]; void push(int x) { S[++top] = x; } int pop() { top--; return S[top+1]; } int main(){ int a,b; char t[100]; while(scanf("%s", t) != EOF){ if(t[0] == '+'){ a = pop(); b = pop(); push(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287476/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287476/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @S = dso_local local_unname...
//set many funcs template //Ver.20180717 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287519/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287519/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int testcase,*number,*swap,*st1,*st2,i,temp,temp2; scanf("%d",&testcase); number = (int*)malloc(sizeof(int*)*testcase); swap = (int*)malloc(sizeof(int*)*testcase); st1 = (int*)malloc(sizeof(int*)*testcase); st2 = (int*)malloc(sizeof(int*)*testcase); for(i=0;i<...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28757/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 countLeapYear(int year1, int year2){ int count = 0, y; for(y = year1; y <= year2; y++){ if(y % 400 == 0 || (y % 4 == 0 && y % 100 != 0)){ printf("%d\n", y); count++; } } return count; } int main(void){ int startYear, stopYear, d = 0, c; while(1){ scanf("%d %d", &startYear, &s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287612/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287612/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(), putchar(), scanf() #include <stdbool.h> bool leap_year(int year) { if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) return true; else return false; } int main(int argc, char **argv) { int a, b; int i; bool b_first = true; while (true) { scanf("%d %d", &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287656/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287656/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> /* prototype declaration */ void printAns(int a, int b, int flag); int isLeapYear(int year); int main(int argc, const char *argv[]) { int a, b, flag = 0; while(scanf("%d%d", &a, &b)!=EOF){ if(a == 0 && b == 0) break; printAns(a, b, flag); flag = 1; } return 0; } void printAns(int a, int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287720/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287720/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 long long int int64; void initBit(int *bit){ int n=bit[0]; for(int i=1;i<=n;i++) bit[i]=0; } void inc(int *bit,int x){ const int n=bit[0]; for(int i=x;i<=n;i+=i&-i) bit[i]++; } int getSum(int *bit,int x){ int res=0; for(int i=x;i>0;i-=i&-i) res+=bit[i]; ret...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287786/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287786/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count.bit = internal unnam...
#include<stdio.h> int main(void) { int w, bi; while(scanf("%d",&w)) { if(w==-1) break; else { if(w<=10) bi = 1150; else if(w>10 && w<=20) { w = w - 10; bi = 1150 + (125*w); } else if(w>20 && w<=30) { w = w - 20; bi = 1150 + (125*10) + (1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287836/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287836/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
// AOJ 3056 Equilateral Triangle // 2018.3.15 bal4u #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() // 整数の入力(負数に対応) { int n = 0, c = gc(); if (c == '-') { c = gc(); do n = 10 * n + (c & 0xf), c = gc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287894/source.c" target datalayout = "e-m:e-p270: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.PP = type { double,...
#include <stdio.h> int main() { int i; long long c=0,sum=0,num=0; scanf("%llu",&num); for(i=0;i<num;i++){ scanf("%llu",&c); sum += c; } printf("%llu\n",sum / num); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287944/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287944/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main() { int i, N, s[101]; scanf("%d", &N); for (i = 1; i <= N; i++) scanf("%d", &(s[i])); int j, flag[10000] = {1}, max = 0; for (i = 1; i <= N; i++) { for (j = 9999; j >= s[i]; j--) { if (flag[j - s[i]] == 1 && flag[j] == 0) { flag[j] = 1; if (j > max &&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287995/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #include <math.h> int sort(const void *a, const void *b){ return *(int*)a-*(int*)b ; } int main(void){ int n; scanf("%d",&n); int a[n],sum=0,not[n],count=0; for (int i=0; i<n; i++){ scanf("%d",&a[i]); s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &N); int s[N], ans=0; int min=101; for(int i=0; i<N; i++){ scanf("%d", &s[i]); ans += s[i]; if(s[i]%10!=0 && s[i]<min){ min = s[i]; } } if(min==101){ printf("0\n"); return...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288095/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288095/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 #include<stdio.h> #include<string.h> #include<stdlib.h> #define inf 1072114514 #define llinf 1145141919810364364 #define mod 1000000007 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288145/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,m,acc=0,wa=0,i,j; scanf("%d%d",&n,&m); int ac[n+2],p[m+1]; char c[m+1]; for(i=0;i<n+1;i++) ac[i]=0; for(i=0;i<m;i++){ scanf("%d %c%c",&p[i],&c[i],&c[i]); if(c[i]=='C') ac[p[i]]=1; } for(i=0;i<m;i++){ if(ac[p[i]]==1){ if(c[i]=='A') wa++; else{ acc++; a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288189/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288189/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ara[100005]; int main() { int prob,sub,n,i,pen=0,ans=0; char ch[3]; scanf("%d %d",&prob,&sub); for(i=0;i<sub;i++){ scanf("%d %s",&n,&ch); if(0==strcmp(ch, "WA") && ara[n]!=-1){ ara[n]++; } else if(0==strcmp(ch, "AC") && ara[n]!=-1){ ans++; pen=pen+ara[n];...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288239/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288239/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int n,m,a[100000],w[100000],i,p,ac,wa; char s[3]; scanf("%d %d",&n,&m); for (i=0;i<n;i++) a[i]=w[i]=0; for (i=0;i<m;i++) { scanf("%d %s",&p,s); if (s[0]=='A') a[p-1]=1; else if (a[p-1]==0) w[p-1]++; } for (ac=wa=i=0;i<n;i++) if (a[i]>0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288282/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288282/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){ printf("a > b\n"); } else if(a<b){ printf("a < b\n"); } else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288332/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288332/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a; int b; scanf("%d %d", &a, &b); if (a < b){ printf("a < b\n"); } else if (a > b){ printf("a > b\n"); } else { printf("a == b\n"); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288390/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288390/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...