Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #define N 25 void Defpre(int); void Defin(int); void Defpost(int); typedef struct node{int nump,numl,numr;}Node; Node array[N]; int n; int main(){ int i,numl,numr,nump; int root,numv; scanf("%d",&n); for(i = 0;i < n;i++){ array[i].nump = -1; } for(i = 0;i < n;i++){ scan...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include<stdio.h> #define MAX 10000 #define NIL -1 struct Node {int p,l,r;}; struct Node T[MAX]; int n; void preParse(int u){ if(u == NIL) return; printf(" %d",u); preParse(T[u].l); preParse(T[u].r); } void inParse(int u){ if(u==NIL) return; inParse(T[u].l); printf(" %d",u); inParse(T[u].r); } void post...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> #define MAX 100 void Preorder(int); void Inorder(int); void Postorder(int); struct Node{ int parent, left, right; }; struct Node Tree[MAX]; int n; int main(){ int root = 0,i,j,a; scanf("%d",&n); for( i = 0 ; i < n ; i++ ){ Tree[i].parent = -1; Tree[i].left = -1; Tre...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102311/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102311/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> #define max 25 #define null -1 typedef struct { int p,l,r; }Node; Node T[max]; void preorder(int root) { if(root==null) return; printf(" %d",root); preorder(T[root].l); preorder(T[root].r); } void inorder(int root) { if(root==null) return; inorder(T[root].l); printf(" %d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102355/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102355/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> typedef struct{ int number; int son[2];//子 int reach; int parent; int sibling; int degree; int height; }node; node B[10000]; int n; int a; int flag=0; void preorder(int num){ // if(num!=a)printf(" "); printf(" %d",B[num].number); if(B[num].son[0]!=-1)preorder(B[num].son[0]); i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102399/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102399/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef struct { int parent; int leftChild; int rightChild; } Node; typedef struct { Node *node; int num; } Tree; #define NL -1 bool initializeTree(Tree *tree, int num) { if((tree->node = malloc(num * sizeof(Node))) == NULL) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102449/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102449/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Tree = type { ptr, ...
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int main() { int t,i; scanf("%d",&t); while(t--) { int n,o,e; scanf("%d",&n); int a[n]; o=0; e=0; for(i=0;i<n;i++) { scanf("%d",&a[i]); if(a[i]%2==0) { e=e+1; } else { o=o+1; } } int odd[o],eve...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1025/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> #define MAX 100 #define NIL -1 typedef struct{ int p; int l; int r; }info; info T[MAX]; int n; void preorder(int); void inorder(int); void postorder(int); int main(){ int i,v,l,r,root; scanf("%d",&n); for(i=0;i<n;i++){ T[i].p=NIL; } for(i=0;i<n;i++){ scanf("%d %d %d",&v,&...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102542/source.c" target datalayout = "e-m:e-p270: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.info = type { i32, ...
#include <stdio.h> #include <stdlib.h> typedef struct tree_t{ int parent; int left; int right; } TREE_T; TREE_T *TREE; int n; int COUNT; void Preorder(int soeji) { printf(" %d", soeji); COUNT++; if(n == COUNT){ printf("\n"); return; } if(TREE[soeji].left != -1) Preorder(TREE[soeji].left); if(TREE...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102593/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102593/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.tree_t = type { i32...
#include<stdio.h> #define MAX 10000 #define NIL -1 struct Node {int p,l,r;}; struct Node T[MAX]; int n; void preParse(int u){ if (u==NIL){ return; } printf(" %d",u); preParse(T[u].l); preParse(T[u].r); } void inParse(int u){ if (u==NIL){ return; } inParse(T[u].l); printf(" %d",u); inParse(T[u].r); } void...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102636/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102636/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include <stdio.h> int main() { int x,y,z,f=0,s=0; scanf("%d%d%d",&x,&y,&z); if(z==0) { if(x>y) printf("+"); else if(x<y) printf("-"); else printf("0"); } else { if((x+z>y)&&(x>y+z)) { f=1; } else if((x+z<y)&&(x<y+z)) { s=1; } el...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10268/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10268/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include<stdio.h> #define MAX 10000 #define NIL -1 typedef struct{ int p; int l; int r; }Node; Node T[MAX]; int n; void preorder(int u){ if(u == NIL) return; printf(" %d", u); preorder(T[u].l); preorder(T[u].r); } void inorder(int u){ if(u == NIL) return; inorder(T[u].l); printf(" %d", u); ino...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102722/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
#include<stdio.h> #include<stdlib.h> #define MAX 25 #define NIL -1 #define N 2 typedef struct { int parent,left,right; }node; node t[MAX]; int n; void preparse(int u){ if(u==NIL)return; printf(" %d",u); preparse(t[u].left); preparse(t[u].right); } void inparse(int u){ if(u==NIL)return; inparse(t[u].left...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102766/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102766/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include <stdio.h> #include <stddef.h> int max(int x, int y) { return x > y ? x : y; } typedef struct Node { int v; struct Node *p; struct Node *l; struct Node *r; } Node; Node* root(Node *node) { return node->p ? root(node->p) : node; } void x_order(Node *node, int x) { if(!node){ return; } if(x == 1) { pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102809/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102809/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.Node = type { i32, ...
// Tree Walk #include <stdio.h> #define MAX 25 // 接点の個数の上限 #define NIL -1 // 番兵(接点番号として使われない値を設定) struct node{ int parent; // 接点の親を参照 int left; // 左の子を参照 int right; // 右の子を参照 }; struct node T[MAX]; // 再帰を使って先行順巡回(Preorder)で表示 void printPreorder(int u){ if(u == NIL)return; printf(" %d", u); printPreord...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, ...
#include <stdio.h> int getDirection(char); int main(){ int jewel[21][21],x,y; int N,M,i,j,distance,can; int nx,ny,dir; const int dx[4] = {-1,0,1,0}; const int dy[4] = {0,1,0,-1}; char direction; char in; /* inテ」ツ?ッテ、ツスツ凖・ツ按?」ツ?ェテヲツ板ケティツ。ツ古」ツつ津ィツェツュテ」ツ?ソティツセツシテ」ツつ?ァツ板ィテ」ツ??*/ while(1){ nx = ny = 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102896/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102896/source.c" target datalayout = "e-m:e-p270: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.dx = private ...
#include<stdio.h> #include<stdlib.h> int main(void) { int i,j,c; int n,m,a=1000; int posx,posy; char dir; int dis; int cx,cy; char map[21][21]; while(a) { scanf("%d ",&n); if(n==0)break; posx = 10; posy = 10; for(i=0;i<=20;i++){ for(j=0;j<=20;j++){ map[i][j] = 0; } } for(i=0...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102939/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102939/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int n; scanf("%d", &n); int i; int p[100005]; for (i = 0; i < n; i++) scanf("%d", &p[i]); int ans = 0; for (i = 0; i < n; i++) { if (p[i] == i + 1) { ans++; p[i] ^= p[i + 1]; p[i + 1] ^= p[i]; p[i] ^= p[i + 1]; } } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_102997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_102997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define POS(cnt,LEN,L) ((((cnt)&1)*(n+1)+(LEN))*(n+1)+(L)) void run(void){ char *s=(char *)calloc(301,sizeof(char)); scanf("%s",s); const int n=strlen(s); int k; scanf("%d",&k); i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103039/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103039/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); char c[A + B + 2]; scanf("%s", c); for(int i = 0; i < A + B + 1; i++){ if(i != A && (0 > c[i] - '0' || c[i] - '0' > 9)){ printf("No\n"); return 0; } else if(i == A && c[i] != '-'){ printf("No\n"); return 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103082/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103082/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 main() { int i, str_a_length, str_b_length; scanf("%d %d", &str_a_length, &str_b_length); char str[str_a_length+str_b_length+2]; scanf("%s", str); for(i = 0; i < str_a_length + str_b_length + 1; i++) { if(i < str_a_length || str_a_length < i) { if(!isdigit(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103125/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103125/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) {int N,A,M,B,x,i,k,l,m,flag,sum; scanf("%d%d",&A,&B); char S[12]; flag=0; scanf("%s",S); for(i=0;i<=11;i++){ if(S[i]=='-'){ m=i+1; flag+=1; }} if((m==A+1)&&(flag==1)){ printf("Yes");} else { printf("No");} retur...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103176/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b; char s[11]; scanf("%d %d", &a, &b); scanf("%s", s); int count = 0; int flag = 1; for (int i=0; i<strlen(s); i++) { //printf("%c",s[i]); if (s[i] == '-') { //printf("\n%d == %d\n", count, a); if (count != a) { fl...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103226/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103226/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, k; scanf("%d%d", &n, &k); int s; if( k <= n/2) { s = 2 * (k - 1) + n - k; } else { s = 2 * (n - k) + k - 1; } int nr = 2 * n + 1 + s; printf("%d\n", nr); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10327/source.c" target datalayout = "e-m:e-p270:32:32-p271: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(void){ char n[201]={}; char temp[201]; int m,i,h,len,j; while(1){ scanf("%s",n); if(n[0] == '-') break; len=strlen(n); scanf("%d",&h); for(i=0;i<h;i++){ scanf("%d", &m); for(j=0;j<len;j++) t...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103327/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103327/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #define MAX 201 int main(void) { char n[MAX], nn[MAX]; int m, h, i, j; int len; while(scanf("%s", n), n[0] != '-'){ len = strlen(n); scanf("%d", &m); for(i=0; i<m; i++){ scanf("%d", &h); for(j=0; j<len-h; j++){ nn[j] = n[h+j]; } for(j=len-h; j<len; j++){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103370/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103370/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 s[400], m, i, j, l=0, h; while(1){ int l=0; while((s[l++]=getchar())!='\n'){} //printf("s[0]=%c\n", s[0]); if(s[0]=='-')break; scanf("%d", &m); for(i=0; i<m; i++){ scanf(" %d", &h); for(j=0; j<l-1; j++)s[l-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103413/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103413/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 A[201],buf[201]; int n,i,h; while(1){ scanf("%s",A); if(strcmp(A,"-")==0) break; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&h); strcpy(buf,A+h); strncat(buf,A,h); strc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103457/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[201], tmp[201]; int m, h, len; int i; while (scanf("%s", str), strcmp(str, "-")) { scanf("%d", &m); len = strlen(str); while (m--) { scanf("%d", &h); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103507/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103507/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,k,n,s; char a[201],b[201]; while(1){ scanf("%s\n%d",a,&n); if(!strcmp(a,"-")) break; for(i=0;i<n;i++){ scanf("%d",&s); for(j=s;a[j]!='\0';j++) b[j-s]=a[j]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103550/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103550/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[258] = {}, tmp[258] = {}; int m, h, i, l; while(scanf("%s", s) && s[0] != '-'){ scanf("%d", &m); while(m--){ scanf("%d", &h); strcpy(tmp, s + h); s[h] = '\0'; strcat(tmp, s); strcpy(s, tmp); } puts(s); } r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103594/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103594/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> struct card { int m; char str[201]; int h[100]; }; void shuffle(struct card *s){ int i,j; char copy[201]="\0"; for (i = 0; i < s->m; i++){ strncpy(copy,&s->str[0], s->h[i]); sprintf(s->str, "%s%s",&s->str[s->h[i]],copy); //str[i]~+str[0]~str[i-1] j = 0; while (copy[j...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103637/source.c" target datalayout = "e-m:e-p270: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.card = type { i32, ...
#include <stdio.h> int main() { char ch[250]={0}; char a[250] ={0}; int h; int i,j,k,l,n,m; while(1){ i=0; while(1){ scanf("%c",&ch[i]); if(ch[i] == '\n') { break; } i++; } if ( i == 1 && ch[0] == '-' ) break; // printf("%d",i);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103680/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103680/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[201],tmp[201]; int i,j,n,h,len; while(1){ scanf("%s",str); if(str[0] == '-') break; len=strlen(str); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d", &h); for(j=0;j<len;j++) tmp[j] = str[j]; for(j=0;j<len-h;j++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103723/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103723/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#pragma region kyopuro_templates #pragma GCC optimize("Ofast") #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdbool.h> #include<assert.h> #include<time.h> #include<ctype.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)f...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103774/source.c" target datalayout = "e-m:e-p270: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.graph_heap = type {...
#include<stdio.h> #include<stdlib.h> int asc(const void* a, const void* b) { if (*(long long int*)a > * (long long int*)b)return 1; if (*(long long int*)a < *(long long int*)b)return -1; return 0; } long long int fact[100005]; long long int modpow(long long int a, long long int n, long long int p) { if (n < 0) re...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103839/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103839/source.c" target datalayout = "e-m:e-p270: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 <math.h> int main(void) { int n; scanf("%d", &n); int count; int min = 100; for (int i= 0; i < n; i++) { int a; scanf("%d",&a); count = 0; while (a % 2 == 0) { a = a / 2; count++; } if (min < count) { continue; } else { min ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <math.h> #include <string.h> #include <stdbool.h> #define _USE_MATH_DEFINES int main() { int n; int a[202]; int count=0; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%d",&a[i]); } while(true) { bool exist_odd=false; for(int i=0;i<n;i++) { if(a[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> //#include <math.h> #define Min(a, b) (a < b ? a : b) int main() { int n; scanf("%d", &n); int a, ans=INT_MAX, cnt; for (int i=0; i<n; i++) { cnt = 0; scanf("%d", &a); while (a%2 == 0) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_103976/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_103976/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> #include <string.h> /*以下便利なマクロを定義する。*/ #define rep(i, min, max) for(i=min; i<=max; i=i+1) #define if_forall(i, min, max, prop)\ \ rep(i, min, max)\ {\ if(!(prop))\ {\ break;\ }\ }\ \ if(i==max+1)\ #define if_exists(i, m...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104018/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104018/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, ans = 0; scanf("%d", &N); int A[N]; for (int i = 0; i < N; i++) { if (ans < 1) { scanf("%d", &A[i]); } if (A[i] % 2 == 0) { A[i] = A[i] / 2; } else { break; } if (i == N-1) { ans++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104061/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104061/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[200]; int n_cnt,output=-1; int i; int flag=0; scanf("%d",&n_cnt); for(i=0;i<n_cnt;i++) scanf("%d",&n[i]); while(!flag) { output++; for(i=0;i<n_cnt;i++) { if(n[i]%2==0) n[i]/=2; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104104/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104104/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int N; int A[210] = {}; scanf("%d", &N); for(int i = 0; i < N; i++){ scanf("%d", &A[i]); } int min = 32; for(int i = 0; i < N; i++){ int count = 0; int buf = A[i]; while(buf%2 == 0){ count++; buf /= 2; } if(count < min){ min = cou...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104148/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104148/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,num,i,min=100,counter; scanf("%d",&n); for(i=0;i<n;i++) { counter = 0; scanf("%d",&num); while(num % 2 == 0) { num = num / 2; counter++; } if(min > counter) { min = counter; } } printf("%d\n",min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { int N; long int A[201]; int min=1000000000; int temp=0; int i; // 整数の入力 scanf("%d", &N); // printf("%d\n",N); for(i=0;i<N;i++){ scanf("%ld", &A[i]); // printf("%ld\n",A[i]); temp = 0; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104241/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> int main(void) { char str[300002]; int q,x,total=0,f,r=0,l=0; scanf("%s",str); scanf("%d",&q); char left[q],right[q]; for(int i=0;i<q;i++){ scanf("%d",&x); if(x==1) total++; else if(x==2){ char tmp,tmp1; scanf("%d",&f); sc...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104285/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104285/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> char s[500050],c; int main(){ int t=200010,r,i,n,q,f=1; scanf("%s %d",s+t,&n); for(r=t;s[r];r++); while(n--){ scanf("%d",&q); if(q==1)f=1-f; else{ scanf("%d %c",&q,&c); if(q%2==f)s[--t]=c; else s[r++]=c; } } if(f){ for(i=t;i<r;i++)printf("%c",s[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104328/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104328/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdbool.h> #define MAX 300000 bool Trampoline(void); int d[MAX]; int N; int main(void) { int i, tmp; scanf("%d", &N); for(i=0; i<N; ++i) { scanf("%d", &d[i]); } if(!Trampoline()) { printf("no\n"); return 0; } for(i=0; i<N/2; ++i) { tmp = d[i]; d[i] ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104379/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104379/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, r; scanf("%d", &n); for (int i = 0; i < n; i++) { int h; scanf("%d", &h); if (r < h) r = h - 1; else if (r == h) r = h; else { printf("No"); return 0; } } printf("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104421/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104421/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int n; int i; int num; char *tmp = NULL; int max=0,min=0; char ch; while(~scanf("%d",&n)){ getchar(); int no = 0; num = 0; max = min = 0; while((ch = getchar())){ if(ch == ' '||ch == '\n'){ if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104465/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104465/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> int main(void) { // 入力 int n; scanf("%d",&n); int listA[n]; for(int i=0;i<n;i++){ scanf("%d",&listA[i]); } for(int i=n-2;i>=0;i--){ if(listA[i]>listA[i+1]){ listA[i]-=1; } } int flg=1; for(int i=0;i<n-1;i++){ if(listA[i]>listA[i+1]){...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104515/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104515/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 h[n]; for(int i = 0; i < n; i++){ scanf("%d", &h[i]); } int ans = 1; for(int i = n - 1; i > 0; i--){ int d = h[i - 1] - h[i]; if(d == 1){ h[i - 1]--; }else if(d > 1){ ans = 0; break; } } if(ans){ prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104566/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; scanf("%c",&c); if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') printf("vowel\n"); else printf("consonant\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104609/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104609/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <stdbool.h> /*以下便利なマクロを定義する。*/ #define rep(i, min, max) for(i=min; i<=max; i=i+1) #define if_forall(i, min, max, prop)\ bool if_forall_condition=1;\ \ for(i=min; i<=max; i=i+1)\ {\ if(!(prop))\ {\ if_forall_condition=0;\ break;\ }\ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104667/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%c",&A); if(A=='a' || A=='i' || A=='u' || A=='e' || A=='o'){ printf("vowel\n"); } else{ printf("consonant\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104717/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104717/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; scanf("%c", &c); if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') printf("vowel\n"); else printf("consonant\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104775/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104775/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%c",&a); if(a=='a'||a=='i'||a=='u'||a=='e'||a=='o'){ printf("vowel\n"); } else{ printf("consonant\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104825/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104825/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { char c; scanf("%c", &c); if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ) { puts("vowel"); } else { puts ("consonant"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104869/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104869/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 c; scanf("%c", &c); printf((c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') ? "vowel" : "consonant"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104911/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N,x; scanf("%lld",&N); if(N%2==0) x=N; else x=2*N; printf("%lld\n",x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104955/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104955/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int n; scanf("%d", &n); if(n%2==0) printf("%d\n", n); else printf("%d\n", n*2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_104999/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_104999/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ long long int n; scanf("%lld",&n); if(n%2==0){ printf("%lld\n",n); } else{ printf("%lld\n",n*2); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105040/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105040/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int N; scanf("%d", &N); if(N%2==0){ printf("%d\n",N); } else{ printf("%d\n",N*2); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105091/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105091/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 A,B,C; scanf("%d",&A); if(A%2==0){ printf("%d",A); }else{ printf("%d",A*2); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105134/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105134/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { long long int n; scanf("%lld",&n); if(n%2!=0) { printf("%lld\n",2*n); } else { printf("%lld\n",n); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105178/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105178/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 9999999999 int main(void) { int mod; int N; scanf("%d", &N); mod = N; //初期値 while(mod <= MAX) { if ((mod%2 == 0) && (mod%N == 0)){ printf("%d", mod); return 0; } mod++; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105279/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105279/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int N; scanf("%d",&N); if(N%2==0) printf("%d",N); else printf("%d",N*2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105329/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105329/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> double w, h; int main(void){ double x, y; double grad; scanf("%lf %lf %lf %lf", &w, &h, &x, &y); printf("%f ", w*h/2); printf("%d", (x == w/2 && y == h/2) ? 1 : 0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105372/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105372/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(){ int W, H, x, y; scanf("%d%d%d%d", &W, &H, &x, &y); printf("%lf %d\n", 1.0*W*H/2, (2*x==W&&2*y==H)?1:0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 W, H, x, y; double S; scanf("%d %d %d %d", &W, &H, &x, &y); S = ((double)W) / 2.0 * ((double)H); if (x * 2 == W && y * 2 == H) { printf("%lf 1\n", S); } else { printf("%lf 0\n", S); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105466/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105466/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int w,h,x,y,flag=0; scanf("%d %d %d %d",&w,&h,&x,&y); if(((double)w)/2 == x && ((double)h)/2 == y) flag=1; printf("%lf %d\n",((double)w*(double)h)/2,flag); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105509/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main() { int w,h,x,y; scanf("%d %d %d %d",&w,&h,&x,&y); printf("%lf ",(double)w * h / 2); if ((x == (double)w / 2) && (y == (double)h / 2)) { printf("1"); } else { printf("0"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105552/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 PE(a, b) {(a) += (b); if((a) >= mod) (a) -= mod;} const int mod = 1000000007; long long int dp[62][3]; int main(){ int i, j; long long int n; scanf("%lld", &n); dp[0][0] = 1; for(i = 0; i < 61; n >>= 1, i++){ for(j = 0; j <= 2; j++){ int x = n & 0x1; int y = j - ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mod = dso_local local_unna...
#include <stdio.h> int main(void){ int N, i, j, tmp=0, last=0, a[200000], flag=0; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%d", &a[i]); if (a[i] == 1 && flag == 0) { flag = 1; } } if (flag == 0) { printf("-1"); return 0; } for (i = 1; i <= N; i++) { for (j = tmp; j < N; j++) { if (a[...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105646/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105646/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n ; // max n = 200000 scanf("%ld",&n) ; long a[200000] ; long i ; for( i = 0 ; i < n ; i++){ scanf("%ld",&a[i]) ; } long cnt, p ; cnt = 0 ; long j = 0 ; int t ; // true or false for( p = 1 ; p <= n ; p++ ){ t = 0 ; for( i = j ; i < n ; i++ ){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105697/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105697/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char b[1000006]; int i; scanf("%s",b); printf("%s",b ); for(i=strlen(b)-1;i>=0;i--) printf("%c",b[i] ); printf("\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10574/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10574/source.c" target datalayout = "e-m:e-p270:32:32-p271: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<stdbool.h> #define ll long long int main(){ bool exist=false; ll n,a[200001],i,cnt=1,ans=0; scanf("%lld",&n); for(i=1;i<=n;i++){ scanf("%lld",&a[i]); if(a[i]==cnt){ exist=true; cnt++; }else{ ans++; } } ans=exist?ans:-1; printf("%lld",ans); r...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #include <string.h> #define MOD 100000 int dp[17712][400]; //1(JOがある)は連続してはいけない->fib(21) = 17711通り int x, y; char map[20][21]; int mask; short check[1 << 20]; /* 1~x-1番目のbitは, その場所を基準として, JOが続くか否かを表す. x番目のbitは, そこにJが来るか来ないかを表す. (JOが作れるか作れないか知るために必要) */ int solve(int place, int bit) { int res; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105840/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @y = dso_local global i32 0...
#include <stdio.h> int main(void){ int n; scanf("%d",&n); printf("%d\n",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105884/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &x); printf("%d\n", x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x; scanf("%d",&x); printf("%d\n",x*x*x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_105970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_105970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106012/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106056/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &x); printf("%d\n", x * x * x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106113/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106157/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int k,i,a[6]={0},j; scanf("%d",&k); for(i=1;i<=k;i++) { scanf("%d",&j); a[j]++; } int n,m; n=a[5]/9; if(a[0]>0) { for(i=1;i<=(9*n);i++) printf("5"); if(n>0) { for(i=1;i<=a[0];i++) printf("0"); } else printf("0"); } else { printf("-1"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10620/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10620/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 x, y, z; scanf("%d", &x); y = x*x; z = x*y; printf("%d\n", z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106243/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106243/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d\n",x*x*x); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106287/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 = 0; scanf("%d", &x); printf("%d\n", x * x * x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106337/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106337/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d\n",x * x * x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106380/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d", &x); printf("%d\n", x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106423/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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); printf("%d\n",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106467/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106467/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int i,k,n; int zeroes=0,fives=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&k); if(k==0) zeroes++; else fives++; } if(zeroes==0) printf("-1\n"); else { k = fives/9; k *= 9; for(i=0;i<k;i++) printf("5"); i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10651/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10651/source.c" target datalayout = "e-m:e-p270:32:32-p271: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" int main(){ int x; scanf("%d",&x); x = pow(x , 3); printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); int a = x * x * x; printf("%d\n",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106597/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&n); int a[100005],fl[100005],max=0,i,k; memset(fl,-1,sizeof(fl)); memset(a,-1,sizeof(a)); // for(i=1;i<=100005;i++) // { // fl[i]=a[i]=-1; // } for(i=1;i<=n;i++) { scanf("%d",&k); if(k>max) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10664/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10664/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> int main(void){ int x; int a; scanf("%d", &x); a = pow(x, 3); printf("%d\n", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106683/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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; scanf("%d",&x); printf("%d\n",x*x*x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_106726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_106726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> #define MAX 1001 int main(void) { long i,n,nul=0,five=0; long a[MAX]; scanf("%ld",&n); for (i=1;i<=n;i++){ scanf("%ld",&a[i]); if (a[i]==0) nul++; else five++;} if (nul==0) printf("-1"); else { while ((five*5)%9!=0) five--; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10677/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10677/source.c" target datalayout = "e-m:e-p270:32:32-p271: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> //4 //5 0 5 0 int main() { int n,c0=0,c9=0,a,i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&a); if (a == 0){ c0++; }else{ c9++; } } if (!c0){printf("-1\n");} else{ a = c9-c9%9; for(i=0;i<a;i++)printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10682/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10682/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...