Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(int argc, char const* argv[]) { int masu[1100]; int dice[1000]; int n, m; int cur; int i; while (1) { scanf("%d%d", &n, &m); if (n == 0 && m == 0){ break; } for (i = 0; i < n; i++) { scanf("%d", &masu[i + 1]); } cur = 1; for (i = 0; i < m; i++) { scanf("%d", &...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326838/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326838/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=C) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326881/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326881/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 >= C) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326931/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326931/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
# include <stdio.h> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); if (a+b >= c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_326982/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_326982/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>=C){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327024/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327024/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 >= c) { printf("Yes\n"); }if (a + b < c) { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327068/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327068/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(c<=a+b){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327118/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327118/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 10000000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int n; int G[N+1][N+1]; int color[N+1]; int d[N+1]; int Q[N+1]; int a=0,b=0; void enqueue(int s){ Q[b] = s; b++; } int dequeue(){ a++; return Q[a-1]; } int empty(){ if(a==b) return 1; else return 0; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327169/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327169/source.c" target datalayout = "e-m:e-p270: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> #include <stdlib.h> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define MAX_N 100 int n,time,head,tail; int *queue; int *dist; int *color; int **matrix; void enqueue(int); int dequeue(void); void bfs(void); int main(){ int i,j,u,k,v; scanf("%d",&n); queue = malloc(MAX_N * sizeof(int));...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327226/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327226/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 LEN 100 #define INF 100000000 int Q[LEN]; int G[LEN][LEN]; int head,tail; int d[LEN]; int n; void enqueue(int x){ Q[tail] = x; tail = (tail+1) % LEN; } int dequeue(){ int x = Q[head]; head = (head+1)%LEN; return x; } int enpty(){ if(tail == head)return 1; else return 0; } v...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327284/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327284/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @Q = dso_local local_unname...
#include<stdio.h> #define INF -1 #define WHITE 0 #define GRAY 1 #define BLACK 2 int A[1000][1000],d[1000],color[1000],Q[1000],top=1,tail=1,n,v,u; void bfs(int); int main(){ int i,j,k; // printf("wa-i1\n"); scanf("%d",&n); //printf("wa-i2\n"); for(i=1;i<=n;i++){ A[i][i]=0; } for(i=1;i<=n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327334/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327334/source.c" target datalayout = "e-m:e-p270: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> #define MAX 1000 #define N 100 int G[MAX][MAX]; int d[MAX],Q[N]; int n; int max=0; int min=0; void en(int q){ Q[max] = q; max++; } int de(){ min++; return Q[min-1]; } int size(){ return max-min; } void bfs(int i){ int a; for(a = 0; a < n; a++){ if(G[i][a] == 1 && d[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327378/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @max = dso_local local_unna...
#include<stdio.h> int main(){ int n; scanf("%d", &n); int g[102][102],d[102]; int i,j; for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ g[i][j] = 0; } d[i]=-1; } int u,k; for(i=0;i<n;i++){ scanf("%d %d", &u,&k); for(j=0;j<k;j++){ int v; scanf("%d", &v); g[u][v] =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327420/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327420/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 matrix[101][101]; int level[101]; int queue[101]; int main() { int n,i,j,u,v,k; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d",&u,&k); for(j=0;j<k;j++){ scanf("%d",&v); matrix[u][v]=1; } } for(i=1;i<=n;i++) level[i]=-1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327464/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327464/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 Q 100 void bfs(); void enqueue(int); int dequeue(); int head = 0,tail = 0,n; int q[Q+1],b[Q+1][Q+1],color[Q+1] = {},d[Q+1] = {}; int main(){ int i,j,id,k,v; scanf("%d",&n); for(i = 1; i < n+1; i++){ scanf("%d %d",&id,&k); for(j = 0;j < k;j++){ scanf("%d",&v); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327521/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327521/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @head = dso_local local_unn...
#include <stdio.h> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define NIL -1 #define N 150 typedef struct{ int id; int k; int v[N]; }DATA; void bfs(int,int,int); void enqueue(int); int dequeue(void); int count=0; int d[N],color[N],G[N][N],Q[N]; DATA data[N]; int main() { int i,j,n; scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327565/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327565/source.c" target datalayout = "e-m:e-p270: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, ...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 100 int head = 0, tail = 0, que[N], M[N][N] = {0}, n; int INF = (1 << 21); void bfs(void); void push(int); int pop(void); int isEmpty(void); int main(void){ int u, k, v, i, j; for(i = 0; i < N; i++){ que[i] = -1; } scanf("%d", &n); for(i = 0; i < ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327615/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327615/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @head = dso_local local_unn...
#include<stdio.h> #include<stdlib.h> int t = 0; typedef struct { int t1; int t2; int *v; int d; int k; }DP; void visit(DP *G, int i){ int j; for(j=0; j<G[i].k; j++){ if(G[G[i].v[j]-1].d > G[i].d || G[G[i].v[j]-1].d == -1){ G[G[i].v[j]-1].d = 1 + G[i].d; visit(G, G[i].v[j]-1); } } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327666/source.c" target datalayout = "e-m:e-p270: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.DP = type { i32, i3...
#include<stdio.h> int main(){ int n; scanf("%d",&n); int divisors=0; while(1){ divisors=0; for(int i=2;i*i<=n;i++){ if(n%i==0){ divisors+=1; } } if(divisors==0){ printf("%d",n); return 0; } n++; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327767/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327767/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cad[100], n, h, m, l, r, x, c=0; int main(){ scanf("%d %d %d", &n, &h, &m); for(int i=0;i<n; i++){ cad[i]=h; } for(int i=0; i<m; i++){ scanf("%d %d %d", &l, &r, &x); for(int j=l-1;j<=r-1;j++){ if(cad[j]>x) cad[j]=x; } } for(int i=0;i<n; i++){ c=c+(cad[i]*cad[i]); } printf("%d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32781/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @c = dso_local local_unnamed_...
#include<stdio.h> #include<stdlib.h> int main() { int j,n,i,c=0; scanf("%d",&n); for(i=n;i>=n;i++) { c=0; for(j=2;j<i;j++) { if(i%j==0) c++; } if(c==0) { printf("%d",i); exit(0); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327853/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 primeTbl[] = {2,3,5,7,11,13,17,19,23,29}; #define PTBL_SIZE (sizeof(primeTbl)/sizeof(primeTbl[0])) int main(void) { int x; int i; int end = 0; scanf("%d", &x); while(end == 0) { for(i=0; i<PTBL_SIZE; i++) { if(x==primeTbl[i]) { end = 1; b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327897/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; int x; scanf("%d", &x); int flag; int cnt = 0; for (i = 2; i <= 1000000; ++i) { flag = 0; for (j = 2; j < i; ++j) { if (i % j == 0) { flag = 1; break; } } if (flag==0&&x == i) { printf("%d\n", x); return 0; } else if (flag==0&&x < i) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_327954/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_327954/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,c,mi,d[10010]; while(scanf("%d %d",&n,&m),n||m){ for(i=c=mi=0;i<n;i++)scanf("%d",&d[i]); for(i=1;i<n;i++){ if(m%d[mi]==m%d[i]){ if(d[i]==d[mi])c++; if(d[i]<d[mi]){ mi=i; c=0; } } if(m%d[mi]<m%d[i]){ mi=i; c=0; } } printf("%d\...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328003/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328003/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 limit 100000 int par[limit]; long long rank[limit]; void init(int N){ for(int i = 0;i < N;i++){ par[i] = i; rank[i] = 1; } } int root(int x){ if(x == par[x]) return x; return par[x] = root(par[x]); } int same(int x,int y){ if(root(x) == root(y)) return 1; return 0;...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328076/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @par = dso_local local_unna...
#include<stdio.h> #include<stdlib.h> typedef struct { int mass; int number; } set; int cmp( const void *p, const void *q ) { return ((set*)q)->number - ((set*)p)->number; } int main(){ int i,j; long k=0; int N,M; scanf("%d %d",&N,&M); set A[N+M]; for(i=0;i<N;i++){ scanf("%d ",&A[i].number)...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328119/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328119/source.c" target datalayout = "e-m:e-p270: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.set = type { i32, i...
#include <float.h> #include <inttypes.h> #include <limits.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif #define getchar getchar_unlocked #define putchar pu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328162/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328162/source.c" target datalayout = "e-m:e-p270: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> int main() { int n, i; char exp[8] = "I hate"; char exp2[8] = "I love"; scanf("%d", &n); for(i=0; i<n; i++) { if(i%2) printf(exp2); else printf(exp); if(i==n-1) { printf(" it"); break; } else printf(" that "); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32822/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32822/source.c" target datalayout = "e-m:e-p270: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.exp = private u...
#include <stdio.h> int main(void) { int a,b; scanf("%d%d",&a,&b); if(a>=13) printf("%d\n",b); else if(a>=6) printf("%d\n",b/2); else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328263/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int A,B; scanf("%d %d",&A,&B); if(A>=13) { printf("%d\n",B); } else if(A<13 && A>5) { B=B*0.5; printf("%d\n",B); } else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328306/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328306/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
//Date:07-08-16 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<float.h> #include<math.h> #include<ctype.h> #include<limits.h> #include<time.h> #define ll unsigned long long #define For(i,n) for(i=0;i<n;i++) #define rep(i ,a ,b) for(i=a;i<=b;i++) #define mset(a ,value) memset(a ,va...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32835/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32835/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d %d",&a,&b); if(a>=0&&a<=100&&b%2==0&&b>=2&&b<=1000) { if(a>=6&&a<=12) { printf("%d",b/2); } else if(a<6) { printf("0"); } else { printf("%d",b); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328393/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>= 13){ printf("%d\n",B); }else if(A>=6){ printf("%d\n",B/2); }else{ printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328436/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328436/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int a,b; scanf("%d%d", &a,&b); if(b%2==0) { if(a>=13) printf("%d\n", b ); else if(a<=12&&a>=6) printf("%d", b/2); else printf("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328487/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328487/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, n, tmp, total; scanf("%d", &n); total = 0; for (i = 0; i < n; ++i) { --total; scanf("%d", &tmp); total += tmp; printf("%d\n", !(total % 2) + 1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32853/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> #include <stdlib.h> int main (){ int n =0, a=0; scanf("%d %d", &n,&a); if (n<=5) printf("0"); else if (n<=12) printf("%d",a/2); else printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328588/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328588/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <= 5) printf("%d\n", 0); else if (a >= 6 && a <= 12) printf("%d\n", b/2); else printf("%d\n", b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 >= 13) { printf("%d\n", B); } else if (6 <= A && A <= 12) { printf("%d\n", B/2); } else { printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328674/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328674/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 2161 Defend the Bases // 2018.3.9 bal4u #include <stdio.h> #include <string.h> #include <math.h> #define MAX 210 int hi[MAX], to[MAX][MAX]; char seen[MAX]; int match[MAX]; int bpm(int u); int bipartiteMatching(int m, int n, int V) { int u, max; memset(match, -1, V*sizeof(int)); max = 0; for (u = 0; u <...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328724/source.c" target datalayout = "e-m:e-p270: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.TROOP = type { i32,...
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include <stdbool.h> #define LL long long #define DB double #define INF 1145141919810364364 #define PI 3.14159265358979 #define MIN(x,y) ((x)<(y)?(x):(y)) #define MAX(x,y) ((x)<(y)?(y):(x)) #define FOR(i,a,n) for(i=a;i<n;i++) #define rep(i,n) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328782/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328782/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @fact = dso_local local_unn...
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<limits.h> #define rep(i,begin,end) for(int i=begin; i<end; i++) #define revrep(i,begin,end) for(int i=begin; i>end; i--) #define lld long long int int cmpAscStrings(const void* a, const void* b){ return strcmp(*(char**)a, *(char**)b...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328825/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MOD 1000000007 typedef long long ll; #include <assert.h> #include <stdio.h> #include <stdlib.h> #define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0])) int compareInt(const void* a, const void* b) { int aNum = *(int*)a; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 main(void){ int n; scanf("%d",&n); int a[n],max=3; for (int i=0; i<n; i++){ scanf("%d",&a[i]); if (a[i]>max){ max=a[i]+1; } } int count[max]; for (int i=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_328926/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_328926/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &n); i = 0; while(n != 1) { if(!i) { printf("I hate that "); i = 1; } else { printf("I love that "); i = 0; } n--; } if(!i) printf("I hate it"); else printf("I love it"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_32897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_32897/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 i,j,n,count; char a[21],b[21]; scanf("%s",b); scanf("%d",&n); for(i=0,count=0;i<n;i++){ scanf("%s",a); for(j=0;j<10;j++) { a[j+10]=a[j]; } a[j+10]='\0'; if(strstr(a,b)!=0) count++; } printf("%d\n",count); scanf("%d",&i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, S, M, L, t; S = M = L = 0; while(1){ scanf("%d %d %d", &a, &b, &c); if(c<a){t=c;c=a;a=t;} if(c<b){t=c;c=b;b=t;} if(!(a+b>c && b+c>a && c+a>b))break; t=c*c-a*a-b*b; if(t<0)S++;if(t==0)M++;if(t>0)L++; } printf("%d %d %d %d\n", S+M+L, M, S, L); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329105/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329105/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x=1; while((x+1)*(x+2)/2<=n)x++; int rest=n-x*(x+1)/2; for(int i=x;i>=1;i--)printf("%d\n",i+(rest-->0)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329149/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 tanri(double r,int y,int mon,int ts) { int i,last; last=0; for(i=0;i<y;i++){ last=last+mon*r; mon=mon-ts; } last=last+mon; return (last); } int fukuri(double r,int y,int mon,int ts) { int i,last; last=0; for(i=0;i<y;i++){ last=mon+mon*r-ts; mon=last; } ret...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329192/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 r; scanf("%lld", &r); long long int a1[r]; long long int a2 = 1; long long int max = 1000000000000000000; long long int hasil ; for(int j=0;j<r;j++){ scanf("%lld", &a1[j]); } for(int h=0;h<r;h++){ if(a1[h]==0){ printf("0\n"); return 0; } } for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329242/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329242/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int N; long long a[100010]; int i; long long s=1; scanf("%d",&N); for(i=0;i<N;i++){ scanf("%lld",&a[i]); } int zero=0; for(i=0;i<N;i++){ if(a[i]==0){ zero=zero+1; } if(zero>0){ printf("0\n"); return 0; } } for(i=0;i<N;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329286/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329286/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> long long a [100010]; int main (){ int n; scanf("%d",&n); for(int i=0;i<n;i++) scanf("%lld",&a[i]); int zero =0; for(int i=0;i<n;i++)if(a[i]==0) zero ++; if(zero >0){ // a[i] contains 0 printf("0\n"); return 0; } long long prod =1; for(int i=0;i<n;i++){ if(a[i ] <=1000000000000000000/ prod ){ // This...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329329/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329329/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> long long a [100010]; int main (){ int n; scanf("%d",&n); for(int i=0;i<n;i++) scanf("%lld",&a[i]); int zero =0; for(int i=0;i<n;i++)if(a[i]==0) zero ++; if(zero >0){ // a[i] contains 0 printf("0\n"); return 0; } long long prod =1; for(int i=0;i<n;i++){ if(a[i ] <=1000000000000000000/ prod ){ // Thi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329372/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329372/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); long long a, ans=1; for(int i=0; i<n; i++) { scanf("%lld", &a); if(a==0) { ans=0; break; } if(a>1000000000000000000/ans) ans=-1; if(ans!=-1) ans*=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100000 int main() { int a; unsigned long long z = 1; scanf("%d", &a); unsigned long long s[N]; unsigned long long n = 0; int count = 0; int flag = 0; for (int i = 0; i < a; i++) { scanf("%lld", &s[i]); if(s[i]==0){ flag = 1; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329480/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329480/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAX 200000 #define INF 2000000000 int compare_int(const void *a,const void *b){ return *(int*)a-*(int*)b; } int main(){ int n,m; int a[MAX+1]; int b[MAX+1]; int j=0,k=0; scanf("%d",&n); for(int i=0;i<n;i++) scanf("%d",&a[i]); a[n]=INF; qsort(a,n,sizeof(int),...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329523/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329523/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, count = 0, real_count = 0; long long int data, prev = 0; scanf("%d", &n); for(i = 0; i<n; i++) { scanf("%d", &data); if(data <= prev) count++; if(count > real_count) real_count = count; if(data > ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329574/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329574/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,max=0,count=0; int h[100000]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&h[i]); } for(i=0;i<n-1;i++){ if(h[i]<h[i+1]){ if(max<count){ max=count; } count=0; } else { count++; } } if(max<count){ max=count; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329617/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h[100000],p=0,max=0,i,j; scanf("%d", &n); for(i=0; i<n; i++) scanf("%d", &h[i]); for(i=1; i<n; i++) { if(h[i-1]>=h[i]) p++; if(h[i-1]<h[i]||i==n-1) { if(max<p) max=p; p=0; } } printf("%d\n", max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329660/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100000 int main() { static int hh[N]; int n, i, cnt, max; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", &hh[i]); max = cnt = 0; for (i = n - 2; i >= 0; i--) { if (hh[i] >= hh[i + 1]) cnt++; else cnt = 0; if (max < cnt) max = cnt; } printf("%d\n", max); re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329703/source.c" target datalayout = "e-m:e-p270: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.hh = internal global ...
#include <stdio.h> int main(){ int n; if(scanf("%d",&n)==1){} int h[n];int i; for(i=0;i<n;i++){ if(scanf("%d",&h[i])==1){} } int max=0;int tmp=0; for(i=0;i<n-1;i++){ if(h[i]>=h[i+1]){ tmp++; if(max<tmp){ max=tmp; } }else{ tmp=0; } } printf("%d",max); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 1000000007 int main(void){ // Your code here! long int step[100001]; long int N; long int i; long int max,tmp; scanf("%ld",&N); max = 0; tmp = 0; for(i=1;N>=i;i++){ scanf("%ld",&step[i]); if(i!=1){ if(step[i-1]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329790/source.c" target datalayout = "e-m:e-p270:32:32-p271:32: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 3129 Contest T-shirts // 2020.1.16 bal4u #include <stdio.h> #define gc() getchar_unlocked() int in() { // 非負整数の入力 int n = 0, c = gc(); do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0'); return n; } #define MIN(a,b) ((a)<=(b)?(a):(b)) int main() { int M, N, a0; M = in(), N = in(); if (M == 2) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329833/source.c" target datalayout = "e-m:e-p270: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...
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main(void) { long long int n, k, i; long long int num = 0; scanf("%lld %lld", &n, &k); for (i = k; i < n + 2; i++) { num = num + (i * (n - i + 1) + 1); } printf("%lld",num%(1000000007)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329877/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329877/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define rep(i,l,n) for(int (i)=(l);(i)<(n);(i)++) #define min(a,b) (a)<(b)?(a):(b) #define max(a,b) (a)>(b)?(a):(b) #define abs(a) (a)>0?(a):-(a) #define llong long long #define P (1000000007) llong mpow(llong a,llong b){ llong ans = 1; wh...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MM 1000000007 #define ll unsigned long long int main(){ ll all=0,i,n,k; scanf("%llu%llu",&n,&k); for(i=k;i<=n+1;++i){ unsigned int temp=i*(n-i+1)%MM; all%=MM; all=all+temp+1; } printf("%llu",all%MM); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_329978/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_329978/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3][100]; scanf("%s%s%s", s[0],s[1],s[2]); printf("A%cC", s[1][0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330019/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330019/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[100], b[100], c[100]; scanf("%s %s %s", a, b, c); printf("%c%c%c\n",a[0],b[0],c[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330062/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330062/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[8],b[8],s[100]; scanf("%s %s %s",a,s,b); printf("A%cC\n",s[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330105/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330105/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a[100],s[100],c[100]; scanf("%s %s %s",a,s,c); printf("A%cC\n",s[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330149/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3][110]; for(int i=0;i<3;i++) scanf("%s",s[i]); printf("A%cC\n",s[1][0]); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330192/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330192/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[110],a[110],b[110]; scanf("%s%s%s",a,s,b); printf("A%cC\n",s[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330235/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330235/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int x,a,b; int jaraka,jarakb; scanf("%d %d %d",&x,&a,&b); jaraka = x-a; jarakb= x-b; if(jaraka<0){ jaraka*= -1; } if(jarakb<0){ jarakb*= -1; } if(jaraka>jarakb){ printf("B\n"); } else{ printf("A\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330286/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330286/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int a,b,c,n,m; scanf("%d%d%d",&a,&b,&c); if(a-b<0) n=b-a; else n=a-b; if(a-c<0) m=c-a; else m=a-c; if(n>m) printf("B\n"); else printf("A\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330336/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t,i; char a[102],b[102],c[102],ch1,ch2,ch3; scanf("%d",&t); while(t--) { scanf("%s",a); getchar(); scanf("%s",b); getchar(); scanf("%s",c); getchar(); for(i=0;i<strlen(c);i++) { if((a[i]==b[i]&&a[i]==c[i])||a[i]==c[i]||b[i]==c[i]) continu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33038/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<math.h> #include<stdlib.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if (abs(a-b)>abs(a-c)) { printf("B\n"); } else{ printf("A\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330437/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330437/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<math.h> int main() { int x,a,b; scanf("%d%d%d",&x,&a,&b); int A,B; A=abs(x-a); B=abs(x-b); //printf("%d %d\n",A,B); if(A<=B) { printf("A\n"); } else { printf("B\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330488/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330488/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> #include<stdlib.h> int main(void) { int t; scanf("%d",&t); while(t--) { int i=0; int n=0; char a[101]; char b[101]; char c[101]; scanf("%s",a); while(a[i]!='\0') { n++; i++; } scanf("%s",b); scanf("%s",c); int flag=1; for(i=0;i<n;i++) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33056/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> typedef long long ll; typedef long double ld; #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define rrep(i,l,r)for(ll i=(l);i>=(r);i--) #define INF (1LL<<60) #defin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330602/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int x, y; scanf("%d%d", &x, &y); printf("%d", x + (y / 2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330646/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330646/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,q,z=0,y=0; scanf("%d",&q); int b[q]; for(i=0;i<q;i++) { b[i]=0; } for(j=0;j<q;j++) { scanf("%d",&n); int a[n+1]; for(i=1;i<=n;i++) { scanf("%d",&a[i]); if(a[i]==1) k=i; } z=0;i=k+1; if(i==n+1) i=1; while(i!=k) { if(i!=1) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33069/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,x,y; scanf("%d%d", &a,&b); x=(b/2); y=(a+x); printf("%d\n", y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330732/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int x,y; scanf("%d %d" ,&x,&y); printf("%d",x + y/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> int main(void) { int x, y; if(scanf("%d %d", &x, &y) == 1); printf("%d", y / 2 + x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 goes here int a,b,x; scanf("%d%d%d",&a,&b,&x); int res[a+b]; int l = a+b; if(a>b){ res[0] = 0; a--; }else{ res[0] = 1; b--; } int i=0; if(x%2 == 0){ for(i=0;i<x-1;i++){ if(res[i] == 0){ res[i+1] = 1; b--; }else{ res[i+1] = 0; a-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33092/source.c" target datalayout = "e-m:e-p270:32:32-p271: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; scanf("%d%d",&a,&b); printf("%d",a+b/2); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_330970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_330970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main (){ int a,b,c; scanf ("%d%d",&a,&b); c=a+(b/2); printf ("%d",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331012/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int x, y; scanf("%d %d", &x, &y); printf("%d\n", x + y / 2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331056/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int min(int x,int y) { if(x>y) return y; return x; } int reach[101][101]; int graph[101][101]; long long int transitiveClosure(int x) { long long sum =0; int i, j, k; for (i = 1; i <= x; i++) for (j = 1; j <=x; j++) reach[i][j] = graph[i][j]; fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_3311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_3311/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @graph = dso_local local_unname...
#include<stdio.h> int main() { int N; scanf("%d", &N); int freq[100]={0}; for(int t=0; t<N; ++t) { int temp; scanf("%d", &temp); ++freq[temp-1]; } int maxFreq=0; for(int y=0; y<100; ++y) if(freq[y]>maxFreq) maxFreq = freq[y]; printf("%d\n",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_33115/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_33115/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 <ctype.h> #include <string.h> int main(void){ char s[102]={0}; char p[102]={0}; int i,j,k,flag,slen,plen,count; count = -100; fgets(s,sizeof(s),stdin); fgets(p,sizeof(p),stdin); slen=strlen(s)-1; plen=strlen(p)-1; for(i=0;i<slen;i++){ if(p[0] == s[i]){ count = 0; for(j=1;j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331193/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unn...
#include<stdio.h> #include<string.h> int main(int argc, char *argv[]) { char s[100], p[100]; char ring[200]; int i = 0; scanf("%s\n%s", s, p); strcpy(ring, s); strcpy((char *)(ring + strlen(s)), s); while (i < strlen(s)) { if (!strncmp((c...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331243/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331243/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ char s[100]; char p[100]; char a[200]; scanf("%s",s); scanf("%s",p); strcpy(a,s); strcat(a,s); if(strstr(a,p)) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331344/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331344/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ char s1[100]; char s2[100]; char s3[100]; int len; int flag=0; char tmp; int i; char *p; scanf("%s",s1); strcpy(s3,s1); len=strlen(s3); scanf("%s",s2); while(1){ // ????????????????????°??¶????????¢ tmp=s3[0]; for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331388/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331388/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 served[200]; char pick[100]; int i=0; int j=0; int k,l,cnt=0; scanf("%s",served); scanf("%s",pick); while(1){ if(served[i++]=='\0') break; } while(1){ if(pick[j++]=='\0') break; } for(k=i-1; k<=2*i-3; k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331438/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331438/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> int main(void){ char s_cat[200]={},s[100], p[100]; scanf("%s",s); scanf("%s",p); strcat(s_cat,s); strcat(s_cat,s); if ((strstr(s_cat, p)) != NULL) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331481/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 argc, const char * argv[]) { char p[120], s[120], ss[250]; scanf("%s %s", s, p); strcpy(ss, s); strcat(ss, s); if (strstr(ss, p)) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331524/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331524/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void){ char s[1000],p[1000],cp[1000]; scanf("%s %s",s,p); strcpy(cp,s); strcat(s,cp); if(strstr(s,p)==NULL)printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331568/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331568/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h>//文字列の長さを知りたい int main(void){ int i=0; char S1[100]={},S2[100]={},P[100]={}; scanf("%s",S2); strcpy(S1,S2);//文字列S1に文字列S2をコピー strcat(S1,S2);//文字列S1に文字列2を連結(リング上の文字から単語を探すため) scanf("%s",P); if(strstr(S1,P)==NULL) printf("No\n"); else printf("Yes\n"); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331610/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void) { char p[200],s[100],a[100]; scanf("%s",p); scanf("%s",s); strcpy(a,p); strcat(p,a); if(strstr(p,s) == NULL) printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331654/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(){ char p[202],s[101],a[101]; scanf("%s%s",p,s); strcpy(a,p); if(strstr(strcat(p,a),s)==NULL){ printf("No\n"); return 0; } printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_331704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_331704/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...