Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void) { int a, b, d,N,K,sum=0; int A[101] = {0}; scanf("%d %d", &N ,&K); for (int i = 0;i<K;i++) { scanf("%d", &d); for (int j = 0;j < d;j++) { scanf("%d",&a); A[a]++; } } for (int i = 1;i <= N;i++) { if (A[i] == 0)sum++; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359518/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359518/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stddef.h> #include <stdio.h> #include <stdlib.h> // I/O void put_uint(int n) { if(!n) { putchar_unlocked('0'); return; } char buf[11]; int i = 0; while(n) buf[i++] = (char)(n % 10 + '0'), n /= 10; while(i--)putchar_unlocked(buf[i]); } void put_str(char *str) { while(*...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359569/source.c" target datalayout = "e-m:e-p270: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> #include <string.h> int main(void){ int n,i,j,k,x,key[2000000],s,l=1,f; char com[20]; k=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s",com); if(strcmp(com,"insert")==0){ scanf("%d",&x); k++; key[k]=x; f=k; } else if(strcmp(com,"delete")==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359611/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359611/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 CMD 16 typedef struct node_t{ long key; struct node_t *prev; struct node_t *next; } node; node *head, *tail; int insert(node *add){ if (!add) return -1; else if (!head) // when add a first node head = tail = add; else { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359662/source.c" target datalayout = "e-m:e-p270: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_t = type { i64...
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ struct node *prev; struct node *next; int key; }; typedef struct node *NodePointer; NodePointer nil; NodePointer search(int k){ NodePointer x; x=nil->next; while(x!=nil && x->key!=k){ x=x->next; } return x; } void insert(int ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359712/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359712/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include<stdio.h> int main(void) { int a, b, i, j, d = 0, f, g, h; scanf("%d",&a); int x[a]; char c[12]; for(i=0;i<a;i++) { scanf("%s %d",c,&b); if(c[0]=='i') { x[i]=b; } else if(c[6]=='F') { i-=2;a-=2; } else if(c[6]=='L'){ i--;a--;d++; } else{ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359756/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359756/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> struct Node { int key; struct Node *prev, *next; }; struct Node *nil; void printList(){ struct Node *cur = nil->next; int isf =0; while(1){ if(cur==nil){ break; } if(isf++>0){ printf(" "); } printf("%d",cur->k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359806/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359806/source.c" target datalayout = "e-m:e-p270: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 MAXCMD 2000000 struct tagLinkList { int forward; int data; int back; }LinkList[MAXCMD]; int head = -1; int tail = 0; int deletePos[20] = { -1 }; void InsertData(int data) { int now, next; now = head; next = ++head; LinkList[next].data = data; LinkList[next].forward = tail; if (n...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359857/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359857/source.c" target datalayout = "e-m:e-p270: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.tagLinkList = type ...
#include<stdio.h> int main() { int t; scanf("%d", &t); long long int n; long long int i; long long int a[10004]; long long int sum; int k; int ans[3][30004]; for (; t > 0; t--) { scanf("%lld", &n); for (i = 0; i < n; i++) scanf("%lld", &a[i]); sum = 0; for (i = 0; i < n; i++) sum += a[i]; if (...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_35990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_35990/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 ...
// AOJ ALDS1_3_C Doubly Linked List // 2018.5.1 bal4u #include <stdio.h> #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() { int n = 0, c = gc(); do n = 10*n + (c & 0xf), c = gc(); while (c >= '0'); return n; } void skip(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359943/source.c" target datalayout = "e-m:e-p270: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> #include<string.h> #include<stdlib.h> typedef struct Node{ int key; struct Node *next; struct Node *prev; }Node; Node *sen; Node* listsearch(int key){ Node *cur=sen->next; while(cur!=sen && cur->key!=key){cur=cur->next;} return cur; } void init(){ sen=(Node *)malloc(sizeof(Node)); s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_359994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_359994/source.c" target datalayout = "e-m:e-p270: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<string.h> #include<stdlib.h> struct List{ int x; struct List *next; struct List *prev; }; typedef struct List *ListPointer; ListPointer head; ListPointer tail; ListPointer listSearch(int x){ ListPointer n; for(n=head->next; n->next!=NULL; n=n->next){ if(n->x==x)return n; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360042/source.c" target datalayout = "e-m:e-p270: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.List = type { i32, ...
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer cur = nil->next; while(1){ if ( cur == nil ) break; if (cur->key == key) return cu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360086/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360086/source.c" target datalayout = "e-m:e-p270: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 <string.h> #include <stdlib.h> struct ListNode { int value; struct ListNode *prev; struct ListNode *next; }; struct ListNode *nil; void init() { nil = (struct ListNode *)malloc(sizeof(struct ListNode)); if (NULL == nil) return ; nil->prev = nil; nil->next = nil; return ; } voi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360129/source.c" target datalayout = "e-m:e-p270: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.ListNode = type { i...
#include <stdio.h> #define N 2000000 #define M 99 int sum[N]; int l,r; int main(){ int n; scanf("%d",&n); while(n--){ char num[M]; scanf("%s",num); if(num[0]=='i')scanf("%d",sum+r++); else if(num[6]==0){ int t; scanf("%d",&t); for(int xu=r-1;xu>=l;xu--)if(sum[xu]==t){ sum[xu]=-1; break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360172/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360172/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef struct Node { int key; struct Node *next,*prev; }Node; Node *nil; Node *listSearch(int); void init(void); void printList(void); void deleteNode(Node *); void deleteFirst(void); void deleteLast(void); void deleteKey(int); void insert(int); int main(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360215/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360215/source.c" target datalayout = "e-m:e-p270: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 <string.h> struct Node{ int key; struct Node* next; struct Node* prev; }; struct Node *search(int); void print(); void insert(int); void delete(struct Node *); void init(void); struct Node *head; int main(){ int num,i,numcom; char command[20]; struct N...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360259/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360259/source.c" target datalayout = "e-m:e-p270: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<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer x; x = nil; while( x->next != nil){ if(x->next->key == key){ return x->next; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360301/source.c" target datalayout = "e-m:e-p270: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<string.h> struct node{ unsigned int key;//keyを格納 struct node *next;//次のキューの位置を格納(先頭の場合はnil) struct node *prev;//前のキューの位置を格納(末尾の場合はnil) }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ /* your code */ int i=0; NodePointe...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360345/source.c" target datalayout = "e-m:e-p270: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 <string.h> struct Node{ int key; struct Node *prev; struct Node *next; }; typedef struct Node Node; Node *nil; void init(void){ nil = (Node *)malloc(sizeof(Node)); nil->next=nil; nil->prev=nil; } void insert(int key){ Node *x=(Node *)malloc(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360396/source.c" target datalayout = "e-m:e-p270: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<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer x; x = nil->next; while(x != nil && x->key != key){ x = x->next; } retu...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360439/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360439/source.c" target datalayout = "e-m:e-p270: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<string.h> struct node{ struct node *prev; struct node *next; long key; }; typedef struct node * NP; NP MN(long); void IN(NP); void DN(NP); void FI(long); NP dummy; int main(){ long int val,i,n; char op[12]; NP roop; scanf("%ld",&n); dummy = MN(0); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360482/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360482/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { ptr, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key) { NodePointer cur = nil->next; while( cur != nil && cur->key != key ) cur = cur->...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360525/source.c" target datalayout = "e-m:e-p270: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 max,min,mar,t,n; int i,j,k,h,h2 = 0; scanf("%d",&t); for(i=0;i<t;i++) { scanf("%d",&n); max = 0; min = 0; for(j=0;j<n;j++) { scanf("%d",&h); if(j !=0) { mar = h2 -h; if(h2 - h < max) max = h2 - h; if(h2 -h > min) min = h2 -...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360569/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 high=0,low=0,n,nn,a[1000]={0}; int i,j,k,l; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&nn); for(j=0;j<nn;j++) { scanf("%d",&a[j]); } for(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 100000 #define NIL -1 typedef struct Node{ int p, l, r; }Node; Node T[Max]; int n, D[Max]; void print(int u){ int i, c; printf("node %d: parent = %d, depth = %d, ", u, T[u].p, D[u]); if(T[u].p == NIL) printf("root, ["); else if(T[u].l == NIL) printf("leaf, ["); else print...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360662/source.c" target datalayout = "e-m:e-p270: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> #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #endif int in() { int n = 0, c = gc(); do n = 10*n + (c & 0xf), c = gc(); while (c >= '0'); return n; } void out(int n) { int i; char ob[20]; if (!n) { pc('0'); return; }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360705/source.c" target datalayout = "e-m:e-p270: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 { i32, ...
#include <stdio.h> #include <stdlib.h> #define MAX 100005 #define NIL -1 int parent[MAX],left[MAX],right[MAX]; int n,D[MAX]; void print(int u){ int i,c; printf("node %d: ",u); printf("parent = %d, ",parent[u]); printf("depth = %d, ",D[u]); if(parent[u]==NIL) printf("root, "); else if (left[u]==NIL)printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360756/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360756/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAXN 100005 #define NULL -1 typedef struct { int p, l, r; }Node; Node T[MAXN]; int n, D[MAXN]; void print(int u) { printf("node %d: ", u); printf("parent = %d, ", T[u].p); printf("depth = %d, ", D[u]); if (T[u].p == NULL) printf("root, "); else if (T[u].l == NULL) printf("leaf, ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360813/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360813/source.c" target datalayout = "e-m:e-p270: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 100000 #define NIL -1 struct node{ int p, l, r; }; struct node T[MAX]; void depth(int); void print(int); int n, H, D[MAX]; int main() { int i, j, d, v, c, l, r; scanf("%d", &n); for ( i = 0; i < n; i++ ) { T[i].p = NIL; T[i].l = NIL; T[i].r = NIL; } for...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360886/source.c" target datalayout = "e-m:e-p270: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 100000 #define NIL -1 typedef struct{ int oya, left, right; }Node; Node Tree[MAX]; int n, Depth[MAX]; int getDepth(int); void print(int); int child[MAX]; int main(void){ int i, j; int d, v; scanf("%d", &n); for ( i = 0; i < n; i++ ) { Tree[i].oya = NIL; Tree...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360943/source.c" target datalayout = "e-m:e-p270: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 100000 struct Node { int p,l,r; }; struct Node T[MAX]; int tree(int); void child(int); int main() { int i,j,n,k,id,c,a; scanf("%d",&n); for(i = 0; i < n ;i++){ T[i].p = -1; T[i].l = -1; T[i].r = -1; } for(i = 0; i < n; i++){ scanf("%d%d",&id,&k); fo...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_360994/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_360994/source.c" target datalayout = "e-m:e-p270: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 N 1000000 int node(int); struct node{ int prant; int left; int right; }; struct node tree[N]; int child[N],depth[N]; int n; int getd(int); void print(int); int main() { int m,a,i,j; scanf("%d",&n); for(i=0; i<n; i++){ tree[i].prant=-1; tree[i].left=-1; tree[i].right=-...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361043/source.c" target datalayout = "e-m:e-p270: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 100005 #define NIL -1 struct Node{int p,l,r,lef;}; struct Node T[MAX]; void print(int u){ int i=T[u].p, depth=0; while(i!=NIL){ i = T[i].p; depth++; } if(depth==0){ printf("node %d: parent = %d, depth = %d, root, ",u,T[u].p,depth); }else if(T[u].l==NIL){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361094/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361094/source.c" target datalayout = "e-m:e-p270: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 100000 typedef struct{ int p; int l; int r; }id; id A[MAX]; int n,B[MAX]; void rec(int x,int y){ B[x] = y; if(A[x].r != -1) rec(A[x].r,y); if(A[x].l != -1) rec(A[x].l,y + 1); } int main(){ int c,d,i,j,v,l,r,n,op; scanf("%d",&n); for(i=0;i<n;i++){ A[i]...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361137/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361137/source.c" target datalayout = "e-m:e-p270: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.id = type { i32, i3...
#include <stdio.h> #define N 200001 #define Max 10000 #define NTL -1 struct Node{ int p,l,r; }; struct Node T[N]; int getDepth(int p){ if(T[p].p == NTL) return 0; return getDepth(T[p].p)+1; } int main() { int n,i,k,j,c; int id,tmp; int depth[N]; scanf("%d",&n); for( i=0;i<n;i++){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361180/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361180/source.c" target datalayout = "e-m:e-p270: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 NIL -1 typedef struct{ int parent,left,right; }Node; Node tree[100001]; int count=0; //再帰関数、子供表示用 int retdepth(int id){ //再帰で根っこまでの長さを計る if (tree[id].parent==NIL){ return count; } else { count++; return retdepth(tree[id].parent); } } void dispdegree(int id){ if (id!=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361230/source.c" target datalayout = "e-m:e-p270: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, ...
#define NIL -1 #define MAX 100005 #include <stdio.h> struct Node { int parent; int left; int right; }; struct Node T[MAX]; int getDepth(int n) { int d = 0; while (T[n].parent != NIL) { n = T[n].parent; d++; } return d; } int main() { int n = 0; scanf("%d", &n); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361274/source.c" target datalayout = "e-m:e-p270: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 parent; int left; int right; } Tree; Tree tree[1000000]; #define NIL -1 int main() { int i,id,j,n,k,c[100000],depth=0,num; scanf("%d",&n); for(i=0;i<n;i++){ tree[i].parent=NIL; tree[i].left=NIL; tree[i].right=NIL; } for(i=0;i<n;i++){ scanf("%d%d"...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361317/source.c" target datalayout = "e-m:e-p270: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 { i32, ...
#include <stdio.h> #define NODEMAX 100000 struct Node { int parent; int lchild; int rsib; }; int main() { int i, j, n, id, nchildren, lchildID, depth; struct Node T[NODEMAX]; scanf("%d",&n); for(i = 0; i < n; i++) { T[i].parent = -1; } for(i = 0; i < n; i++) { scanf("%d%d",&id,&nchi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361360/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361360/source.c" target datalayout = "e-m:e-p270: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 N 100000 typedef struct{ int pare,fstch,sibling; }Node; Node node[N]; int n,dep[N]; void print(int x){ int i,ch; printf("node %d: parent = %d, depth = %d, ",x,node[x].pare,dep[x]); if(node[x].pare==-1) printf("root, "); else if(node[x].fstch==-1) printf("leaf, "); else printf("...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361403/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361403/source.c" target datalayout = "e-m:e-p270: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 100000 int type(int,int); typedef struct{ int le,ri,pa; }data; data Da[MAX]; int De[MAX]; int main(){ int n,id,k,buf,bufi,chk=0,le,ri; int i,j; scanf("%d",&n); for(i=0;i<n;i++) Da[i].pa=Da[i].le=Da[i].ri=-1; for(i=0;i<n;i++){ scanf("%d%d",&id,&k); for(j=...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361447/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.data = type { i32, ...
#include<stdio.h> #define MAX 100000 struct Node{ int parent; int left; int right; }; struct Node T[MAX]; int getDepth(int num){ int depth = 0; for(depth = 0; T[num].parent != -1; depth++){ num = T[num].parent; } return depth; } int main(void){ int n, i, j; int num, deg, child, k = 0; scanf("%d", &n);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361490/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361490/source.c" target datalayout = "e-m:e-p270: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 100005 #define NIL -1 typedef struct{ int p, lc, rs; }node; node T[MAX]; int i,j,n; int main(void) { int id, k, c, d=0, count, temp; scanf("%d", &n); //initialize for (i=0; i<n; i++){ T[i].p = T[i].lc = T[i].rs = NIL; } for(i=0; i<n; i++){ scanf("%d %d", &id, &k); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361533/source.c" target datalayout = "e-m:e-p270: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 NIL -1 #define MAX 100005 typedef struct node{ int p; //親 int l; //一番左の子 int r; //右の兄弟 }Node; Node T[MAX]; int D[MAX]; int n; void print(int u){ int i,c; printf("node %d: ",u); printf("parent = %d, ",T[u].p); printf("depth = %d, ",D[u]); if(T[u].p == NIL) printf("root, "); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361577/source.c" target datalayout = "e-m:e-p270: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<string.h> #define MAX 100000 #define LEN 14 #define NIL -1 typedef struct{ int parent; int left; //自分の子供かつ一番左のやつ int right; //すぐ右隣の兄弟 char state[LEN]; //節点の種類 int depth; //深さ }node; void setDepth(int, int); void printChildren(int); node t[MAX]; int main(){ int n, k, c[MAX], in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361670/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361670/source.c" target datalayout = "e-m:e-p270: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> enum{ ROOT, InternalNode, LEAF }; typedef struct _node{ int parent; int depth; int type; //0:root,1:internal node,2:leaf int *child; int cCnt; }NODE; int getroot(NODE node[],int n){ int i; for(i=0;i<n;i++)if(node[i].parent==-1)return i; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361713/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361713/source.c" target datalayout = "e-m:e-p270: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(){ char s[1010],t[1010]; int i,j,n,m; scanf("%s %s",s,t); for(n=0;s[n];n++); for(m=0;t[m];m++); for(i=n-m+1;i--;){ for(j=0;j<m;j++){ if(s[i+j]=='?')continue; if(s[i+j]-t[j])goto NEXT; } for(j=0;j<m;j++)s[i+j]=t[j]; for(j=0;j<n;j++){ if(s[j]=='?')s...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361757/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int n,x,y,a,k,m; scanf("%d %d %d",&x,&y,&n); a=y%x; m=n%x; k=(m-a); if(k==0) printf("%d\n",n); else if(k>0) printf("%d\n",n-k); else printf("%d\n",n-k-x); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36180/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36180/source.c" target datalayout = "e-m:e-p270:32:32-p271: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,k; char s[100],w[100],t[100],ans[100]={127}; scanf("%s %s",s,t); for(i=0;s[i];i++){ for(j=0;t[j];j++){ if(s[i+j]==0)break; if(s[i+j]==t[j]||s[i+j]=='?')continue; else break; } if(t[j]==0){//printf("%d\n",i); for(k=0;s[k...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361843/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361843/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> #define SIZE 2000000 int main() { int A[SIZE]; int H=0; int i, key, l, largest, p, tmp; char com[20]; do { scanf("%s", com); if (com[0] == 'i') { scanf("%d", &key); A[++H] = key; for (i=H; i>1 && A[i/2]<A[i];i/=2) { tmp = A[i/2]; A[i/2] = A[i]; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361887/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361887/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ int a,b,c,d,e,f,g,h,i; scanf("%d",&h); for(i=0;i<h;i++) { scanf("%d %d %d",&a,&b,&c); d=c-b; e=d/a; f=e*a; g=f+b; printf("%d\n",g); } return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36193/source.c" target datalayout = "e-m:e-p270:32:32-p271: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 2000000 #define INFTY (1<<30) int H, A[MAX+1]; void maxHeapify(int); int extract(void); void increseKey(int, int); void insert(int); void swap(int *, int *); int main() { int key; char s[10]; while(1) { scanf("%s", s); if( s[0] == 'e' && s[1] == 'n' ) { break; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_361995/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_361995/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> // printf(), scanf() #include <stdbool.h> #define MAX_N 2000000 #define swap(a, b) { int t; t = a; a = b; b = t; } const int INF = (1 << 30); int a[MAX_N + 1]; int h; void max_heapify(int i) { int largest; int l = 2 * i; int r = 2 * i + 1; /* ????????????????????????????????§???????...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362044/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362044/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @INF = dso_local local_unna...
#include <stdio.h> #define N 2000000 #define INF -1000000 int size, A[N]; void increaseKey(int i, int key) { int tmp; if (key < A[i]) return; A[i] = key; while(i>1 && A[i/2]<A[i]) { tmp = A[i]; A[i] = A[i/2]; A[i/2] = tmp; i=i/2; } } void maxHeapify(int i) { int l,r,largest; int tmp; l = i*2; r = ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362088/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362088/source.c" target datalayout = "e-m:e-p270: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 <string.h> int parent(int ); int left(int ); int right(int ); void maxHeapInsert(int ); int heapIncreaseKey(int ,int ); int heapExtractMax(void); void maxHeapify(int ); int heap_size=0; int A[2000000]; int main() { char string[10]; int key; while(1) { scanf("%s",string); if(strcmp(st...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362181/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362181/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @heap_size = dso_local loca...
#include<stdio.h> #define MAX 2000000 #define INFTY 999999999 int H,A[MAX+1]; void maxHeapify(int ); int extract(); void increaseKey(int , int ); void insert(int ); int main() { int key; char com[10]; while(1){ scanf("%s",com); if(com[0]=='e' && com[1]=='n')break; if(com[0]=='i'){ scanf("%d",...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362231/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362231/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 2000000001 int S[MAX],H = 1; int parent(int i){ return i/2; } int left(int i){ return 2*i; } int right(int i){ return 2*i+1; } void maxHeapify(int i){ int l,r,largest,tmp; l = left(i); r = right(i); if(l <= H && S[l] > S[i]) largest = l; else largest = i; if(r <= H && ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362282/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362282/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @H = dso_local local_unname...
#include <stdio.h> #include <string.h> static int heap[2000000+1]; static int heap_size = 0; static void exchange(int A[], int x, int y) { int t = A[x]; A[x] = A[y]; A[y] = t; return; } static void sink(int A[], int size, int i) { int l = i * 2; int r = i * 2 + 1; int larger; if...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362332/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362332/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N 2000000 #define INF 50000000 int H,a[N+1]; void maxh(int); void swap(int *,int *); int extract(); void incrk(int,int); void insert(int); int main(){ int key; char str[10]; while(1){ scanf("%s",str); if(strcmp(str,"end")==0 ) break; else if(str[0]=='i'...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362383/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362383/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 2000000 int n,A[MAX+1]; void insert(int); void increase(int,int); void max(int); int extract(); int main(){ int k; char CHAR[10]; while(1){ scanf("%s",CHAR); if(strcmp(CHAR,"end")==0) break; if(strcmp(CHAR,"insert")==0){ ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362426/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362426/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h> int HeapSize; void swap(int *a,int *b) { int tmp; tmp = *a; *a = *b; *b = tmp; } void maxHeapify(int *A,int i) { int l, r, largest; l= i*2; r = i*2+1; if(l <= HeapSize && A[l] > A[i]) largest = l; else largest = i; if(r <= Hea...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362477/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362477/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @HeapSize = dso_local local...
#include<stdio.h> int main(void){ long long n; scanf("%lld",&n); int keta; long long a = n; while(a > 10){ a /= 10; keta ++; } long long ans = 0; long long temp , tas , waru; for(int i = 0;i < (1<<keta);i ++){ tas = n; temp = i; waru = 10; while(temp > 0){ if(temp%2 =...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362527/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362527/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) { long long n,i,j,k,d[20],a; char s[20] = {0}; scanf("%s",s); for(i=0;s[i];i++) d[i]=s[i]-'0';//printf("%d\n",i); for(j=a=0;j<(1<<(i-1));j++) { n=d[0]; for(k=0;k<i-1;k++) { if(j&(1<<k))n=n*10+d[k+1]; else { a+=n;//printf("%d\n",n); n=d[k+1]; } ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362570/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362570/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void) { int i, a, b; for(i=0; i<7; i++) { scanf("%d%d",&a,&b); printf("%d\n",a - b); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362613/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362613/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[7], b[7]; int i; for (i = 0; i < 7; i++) { scanf("%d %d", &a[i], &b[i]); printf("%d\n", a[i] - b[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362657/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362657/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max(a,b) (a)>(b)?(a):(b) #define min(a,b) (a)>(b)?(b):(a) int cmp(const void *a, const void *b) { return *(int*)a-*(int*)b; } int main(void) { int n; int *num; scanf("%d",&n); num = (int*)malloc(sizeof(int)*n); in...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36270/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36270/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void) { int a,b,c[7],d; for(d=0;d<7;d++){ scanf("%d %d",&a,&b); c[d]=a-b; } for(d=0;d<7;d++){ printf("%d\n",c[d]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362743/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362743/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,m,count[1000001],res; char s[1000001],ioi[4]="IOI"; while(scanf("%d",&n),n){ scanf("%d %s",&m,s); for(i=0;i<1000001;count[i]=0,i++); for(i=0;i<=m;i++) if(strncmp(s+i,ioi,3)==0)count[i]=count[i-2]+1; for(i=0,res=0;i<m;i++...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362808/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362808/source.c" target datalayout = "e-m:e-p270: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.ioi = private...
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362901/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362901/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 R , G ; scanf("%d%d",&R,&G); int p = (2*G)-R; printf("%d",p); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_362989/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_362989/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdio.h> int main(void){ int r,g; scanf("%d%d",&r,&g); printf("%d",2*g-r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363030/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363030/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 R, G, x; scanf("%d", &R); scanf("%d", &G); x = 2 * G - R; if(R >= 0 && R <= 4500 && G >= 0 && G <= 4500){ printf("%d", x); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363074/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363074/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 descending_compare(const void *a, const void *b){ if (*(int*)a > *(int*)b){ return -1; }else if (*(int*)a == *(int*)b){ return 0; }else{ return 1; } } int ascending_compare(const void *a, const voi...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 r,g; scanf("%d%d",&r,&g); printf("%d",2*g-r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[81]; int sum, number, i, len; sum = 0; while (scanf("%s", str) != EOF){ len = strlen(str); for (i = 0; i < len; i++){ number = 0; if (str[i] >= '0' && str[i] <= '9'){ while (str[i] >= '0' && str[i] <= '9'){ number = number * 1...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 str[81]; int num = 0; while (scanf("%s", str) != EOF){ int i; for (i = 0; str[i] != 0; i++){ int tmp = 0; for (; '0' <= str[i] && str[i] <= '9'; i++){ tmp *= 10; tmp += str[i] - '0'; } num += tmp; if (str[i] == 0){ break; } } } pr...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363283/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363283/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
/* cat <<EOF >mistaken-paste */ #pragma GCC diagnostic ignored "-Wincompatible-pointer-types" #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> #define BIG 2000000007 #define VERYBIG 200000000000007LL #define MOD 1000000007 typedef uint64_t ull; ty...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @h = dso_local global i64 0...
// AOJ 2525: Change // 2017.10.6 bal4u@uu #include <stdio.h> int main() { int rd, rr; long long m, cd, cr, s, t; scanf("%lld%d%d%lld%lld", &m, &rd, &rr, &cd, &cr); s = cd * 100 / rd; if (cd * 100 % rd) s++; t = cr * 100 / rr; if (cr * 100 % rr) t++; if (m-s-t < 0) puts("-1"); else printf(...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363391/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 haiku[4],m=0,i,n=0; for(i=0;i<3;i++) { scanf("%d",&haiku[i]); } for(i=0;i<3;i++) { if(haiku[i] == 5) { m++; } else if(haiku[i] == 7) { n++; } } if(m==2 && n==1) { ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363441/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363441/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[3],count1=0,count=0; for(int i=0;i<3;i++){ scanf("%d",&a[i]); if(a[i]==5){ count1++; }else if(a[i]==7){ count++; } } if(count1==2&&count==1){ printf("YES"); }else { prin...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363485/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363485/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> int main() { int i,num[3]; for(i=0; i<3; i++) { scanf("%d", &num[i]); } if (num[0] == 7) { if(num[1] == 5 && num[2] == 5) { printf("YES"); } else { printf("NO"); } } else if(num[1] == 7) { if(num[0] == 5 && num[2] == 5) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363528/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363528/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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==5 && b==5 && c==7){ printf("YES\n"); } else if(a==7 && b==5 && c==5){ printf("YES\n"); } else if(a==5 && b==7 && c==5){ printf("YES\n"); } else { printf("NO\n"); } return ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363571/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363571/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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==5)&&(b==5)&&(c==7))||((a==5)&&(b==7)&&(c==5))||((a==7)&&(b==5)&&(c==5))) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363614/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363614/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 == 5&& b == 5&& c == 7) printf("YES\n"); else if (a == 5&& b == 7&& c == 5) printf("YES\n"); else if (a == 7&& b == 5&& c == 5) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363658/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 == 5 && b == 5 && c == 7){ printf("YES\n"); } else if(a == 5 && b == 7 && c == 5){ printf("YES\n"); } else if(a == 7 && b == 5 && c == 5){ printf("YES\n"); } else{ printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363708/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363708/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> typedef long long int ll; void swap(ll *x,ll *y){ll temp;temp=*x;*x=*y;*y=temp;} ll asc(const void *a,const void *b){return *(ll*)a-*(ll*)b;} ll desc(const void *a,const void *b){return *(ll*)b-*(ll*)a;} ll max(ll x,ll y){return x>y?x:y;} ll min(l...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363751/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363751/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(void){ int a[3],cnt5=0,cnt7=0,i; scanf("%d%d%d",&a[0],&a[1],&a[2]); for(i=0;i<3;i++){ if(a[i]==5) cnt5++; else if(a[i]==7) cnt7++; } if((cnt5==2) && (cnt7==1)) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363795/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363795/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 =0,b =0,c =0; int fcount =0,scount =0; scanf("%d %d %d",&a, &b, &c ); if(a == 5){ fcount++; }else if( a ==7){ scount++; } if(b == 5){ fcount++; }else if( b ==7){ scount++; } if(c == 5){ fcount++; ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363867/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363867/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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> void testcase() { int x,y; scanf("%d %d",&x,&y); if((x+y)%2 != 0) { printf("%d %d\n",-1,-1); return; } if(x>=y) { printf("%d %d\n",(x-y)/2,y); return; } if(x<y) { printf("%d %d\n",x,(y-x)/2); } } int main() { int t; scanf("%d", &t); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_36391/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_36391/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr ...
#include <stdio.h> int main(void){ int a, b, c, f=2, s=1; scanf("%d%d%d", &a, &b, &c); a == 5 ? f-- : a == 7 ? s--:0; b == 5 ? f-- : b == 7 ? s--:0; c == 5 ? f-- : c == 7 ? s--:0; printf(f == 0 && s == 0 ? "YES\n": "NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_363953/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_363953/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 != 17) { printf("NO\n"); return 0; } if (a == 5) { if (b == 5) { printf("YES\n"); } else if (b == 7) { printf("YES\n"); } else { printf("NO\n"); } } else if (a == 7) { if (b == 5) {...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364002/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364002/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<stdlib.h> typedef long long int int64; int cmp(const void *a,const void *b){ return *(int *)a-*(int *)b; } void run(void){ int n; scanf("%d",&n); int *a=(int *)calloc(n,sizeof(int)); int i; for(i=0;i<n;i++) scanf("%d",a+i); int *b=(int *)calloc(n,sizeof(int)); for(i=0;i<n;i...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364053/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364053/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#define _CRT_SECURE_NO_WARNINGS #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <limits.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364097/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364097/source.c" target datalayout = "e-m:e-p270: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.UF_Node = type { i6...
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <time.h> #define pai 3.1415926535 int main(void) { int N; scanf("%d", &N); char S[11]; scanf("%s", S); int K; scanf("%d", &K); for (int i = 0; i < N; i++) { if (S[i] != S[K - 1]) { S[i] = '*'; } } printf("%s\n", S);...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364161/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364161/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> int main(){ char S[10]; int N,K,i; scanf("%d",&N); scanf("%s",&S); scanf("%d",&K); for(i=0;i<N;i++){ if(S[i]!=S[K-1]){ S[i]='*'; } } printf("%s\n",S); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364204/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364204/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, K, i; char S[10]; scanf("%d", &N); scanf("%s", S); scanf("%d", &K); for(i=0; i<N; i++){ if(S[i] != S[K-1]) S[i] = '*'; } printf("%s \n", S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364248/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364248/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include<stdio.h> #include<string.h> int main(void){ int N, K; scanf("%d", &N); char S[N]; scanf("%s", S); scanf("%d", &K); for(int i=0; i<N; i++){ if(S[i] != S[K-1]){ S[i] = '*'; } } printf("%s\n", S); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364291/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364291/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...
#include <stdlib.h> #include <string.h> #include <math.h> #include <stdio.h> int main() { int n,a,b,i,m,k,x,y,c; scanf("%d",&n); char s[n+1]; scanf("%s",s); scanf("%d",&k); for(i=0;i<n;i++){ if(s[i]==s[k-1]){ printf("%c",s[i]); }else{ printf("*"); }...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364334/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364334/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,int b){return a<b?a:b;} int main(){ int n,m,i,a,b,c,j,k,d[100010]={}; scanf("%d %d",&n,&m); n=(1<<n);//printf("%d\n",n); for(i=1;i<n;i++)d[i]=1e9+10; while(m--){//printf("%d\n",m); scanf("%d %d",&a,&b); k=0; while(b--){//printf("!%d\n",b); scanf("%d",&c); ...
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_364378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_364378/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_add...