Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int BubbleSort(int *a,int b);
int main(int argc, const char * argv[]) {
int a[100],n,i;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
printf("%d\n",BubbleSort(&a,n));
}
int BubbleSort(int *a,int n){
int i,tmp,count=0 ;
int flag = 1;
while(flag){
flag=0;
for(i=n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282486/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 bubbleSort(int A[],int n){
int flag,c=0,j,tmp;
flag=1;
while(flag){
flag=0;
for(j=n-1;j>0;j--){
if(A[j]<A[j-1]){
tmp=A[j];
A[j]=A[j-1];
A[j-1]=tmp;
flag=1;
c++;
}
}
}
return c;
}
int main(){
int i,n,A[100],j,c;
scan... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282529/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282529/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main( ){
int i,j,N,flag,tmp,count=0;
int A[100];
scanf("%d",&N);
if((N > 100) &&(N < 0)){
printf("N is error\n");
}
for(i = 0; i < N; i++){
scanf("%d",&A[i]);
}
flag = 1;
while(flag){
flag = 0;
for(i = N-1; i > 0; i--){
if(A[i]<A[i-1]){
tmp = A[i];
A[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282572/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282572/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int N,i,T=100,m,count=0,flag=1;
scanf("%d",&N);
int a[N];
for(i=0;i<N;i++){
scanf("%d",&a[i]);
}
while(flag){
flag=0;
for(i=0;i<N-1;i++){
if(a[i]>a[i+1]){
m=a[i];
a[i]=a[i+1];
a[i+1]=m;
count++;
flag=1;
}
}
}
for(i=0;i<N-1;i++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282615/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282615/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100],i,j,count=0,key=0;
scanf("%d",&N);
for(i = 0 ; i < N ; i++){
scanf("%d",&A[i]);
}
for(i = 0 ; i < N ; i++){
for(j = N-1 ; j > i ; j--){
if(A[j] < A[j-1]){
key = A[j];
A[j] = A[j-1];
A[j-1] = key;
count++;
}
}
}
for(j = 0 ; j < ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282659/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282659/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
static int cnt = 0;
void trace(int a[], int n) {
int i;
for (i = 1; i <= n; i++) {
if (i > 1) {
printf(" ");
}
printf("%d", a[i]);
}
printf("\n%d\n", cnt);
}
int main(void) {
int *a, i, j, n, temp;
scanf("%d", &n);
a = (int *) malloc(sizeof(int) * (n + 1));
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282701/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282701/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.1 = private unnamed_a... |
#include <stdio.h>
void bubbleSort(int A[], const int N)
{
int i;
int flag = 1, cnt = 0;
while( flag ){ //ここを消して下2行でも可 (1)
//int j;
//for( j = 0; flag; ++j ){
flag = 0;
for( i = N-1; 0 < i; --i ) //ここを消して下1行でも可 (1)
//for( i = N-1; j < i; --i )
if( A[i] < A[i-1]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282781/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282781/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str.1 = private unnamed_a... |
#include<stdio.h>
int main(void)
{
int n,work;
int k=0;
int count=0;
int flag=1;
int S[100];
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&S[i]);
}
while(flag){
flag=0;
for(int i=n-1;i>=k+1;i--){
if(S[i]<S[i-1]){
work=S[i];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282824/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282824/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count=0;
void sw(int *a,int *b){
int t;
t = *a;
*a = *b;
*b = t;
}
void B_sort(int array[],int s){
int a,b;
for(a=0;a<s-1;a++){
for(b=s-1;b>=a+1;b--){
if(array[b]<array[b-1]){
sw(&array[b],&array[b-1]);
count++;
}
}
}
}
int main(){
int s;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282868/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282868/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@count = dso_local local_un... |
#include <stdio.h>
int main(){
int i,j,n,tmp;
int cnt=0;
scanf("%d",&n);
int A[n];
for(i=0; i<n; i++)
scanf("%d",&A[i]);
for(i=0; i<n; i++)
for(j=n-1; j>=i; j--)
if(A[j] < A[j-1]){
tmp = A[j];
A[j] = A[j-1];
A[j-1] = tmp;
cnt++;
}
for(i=0; i<n-1; i++)
printf("%d ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282910/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282910/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 flag,a,N,i,j,*A,cnt=0;
scanf("%d",&N);
A=malloc(N*sizeof(int *));
flag=1;
for(i=0;i<=N-1;i++)scanf("%d",&A[i]);
while(flag){
flag=0;
for(j=N-1;j>=1;j--){
if(A[j]<A[j-1]){
a=A[j];
A[j]=A[j-1];
A[j-1]=a;
flag=1;
c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282954/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282954/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 bubbleSort(int *,int );
int main()
{
int atai,n,i,ori[100];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&ori[i]);
}
atai= bubbleSort(ori,n);
for(i=0;i<n-1;i++){
printf("%d ",ori[i]);
}
printf("%d\n",ori[n-1]);
printf("%d\n",atai);
return 0;
}
int bubbleSort(int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_282998/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_282998/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<limits.h>
int a[200005];
int peak[200005];
int peak_cpy[200005];
int main(){
int t;
scanf("%d", &t);
int n, k;
while(t--){
scanf("%d %d", &n, &k);
int left = -1, right;
for(int i = 0; i <= n; i++){
peak[i] = 0;
peak_cpy[i] = 0;
}
/*for(int i = 1; i <= n; i++){... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28304/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28304/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
int main(){
int N;
int i, j, tmp;
int flag = 1;
int count = 0;
scanf("%d",&N);
int A[N];
for(i = 0; i < N; i++){
scanf("%d",&A[i]);
}
while (flag){
flag = 0;
for(j = N-1; j > 0; j--){
if(A[j] < A[j-1]){
tmp... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283083/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283083/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define print(x) printf("%d",x)
#define scan(x) scanf("%d",&x)
#define printn(x) printf("%d\n",x)
#define rep(i,n,m) for(int i = n; i < m; i++)
int main(void){
int flag = 1;
int i;
int n;
int ex;
int a[100];
int count = 0;
scan(n);
rep(i,0,n){
scan(a[i]);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283126/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283126/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[200];
int i, j, k;
int flag;
int tmp, count=0;
scanf("%d", &N);
for(i=0; i<N; i++){
scanf("%d", &A[i]);
}
for(i=0; i<N; i++){
for(j=N-1; j>i; j--){
if(A[j]<A[j-1]){
tmp = A[j];
A... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283177/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283177/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 N,j,i=0,*A,num,k=0;
scanf("%d",&N);
A = (int *)malloc(N * sizeof(int));
for(j = 0 ; j < N ; j++) scanf("%d",&A[j]);
for(i = 0 ; i < N-1 ; i++){
for(j = N-1 ; j >= i+1 ; j--){
if(A[j] < A[j-1]){
num = A[j];
A[j] = A[j-1];
A[j-1] = num;
k+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283234/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283234/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define N 100
int main(){
int i, j, length, x, A[N], swap_count=0;
//There is x in this program for storing the value of the element of A.
scanf("%d",&length);
for(i = 0; i < length; i++) scanf("%d",&A[i]);
for(i = 0; i < length; i++){
for(j = length-1; j > i; j--){
if( A[j] < ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283278/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283278/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 bubbleSort(int *,int);
int main(){
int N,j;
int A[100];
int sw = 0;
scanf("%d",&N);
for(j=0;j < N;j++){
scanf("%d",&A[j]);
}
sw = bubbleSort(A,N);
for(j=0 ;j < N;j++){
if(j > 0){
printf(" ");
}
printf("%d",A[j]);
}
printf("\n");
printf("%... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283320/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283320/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define N 100
typedef struct {
int array[N];
} Array;
int bubble( Array *, int );
int main() {
int i = 0,
num = 0,
inp = 0,
ret = 0;
Array a;
scanf( "%d", &num );
for( i=0; i < num; i++ ) {
scanf( "%d", &a.array[i] );
}
ret = bubble( ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283371/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283371/source.c"
target datalayout = "e-m:e-p270: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.Array = type { [100... |
#include <stdio.h>
void bubbleSort(int *A,int N){
int flag,j,count=0,t;
flag=1;
while(flag){
flag=0;
for(j=N-1;j>0;j--){
if(A[j]<A[j-1]){
count++;
t=A[j];
A[j]=A[j-1];
A[j-1]=t;
flag=1;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283421/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283421/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main () {
int i, j, c, N, t;
int a[100];
t = 0;
scanf("%d", &N);
for (i = 0; i < N; i++)
scanf("%d", &a[i]);
for (i = 0; i < N; i++) {
for (j = N - 1; j > 0; j--) {
if (a[j] < a[j - 1]) {
c = a[j];
a[j] =... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283465/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283465/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 D,L,j,i;
scanf("%d %d",&D,&L);
if (!D%L==0){
i=D/L+D%L;
printf("%d\n",i);
}
else {
i=D/L;
printf("%d\n",i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283515/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283515/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 D, L;
scanf("%d %d", &D, &L);
printf("%d\n", D / L + D % L);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283559/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283559/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
// your code goes here
int D,L,ans;
scanf("%d%d",&D,&L);
ans=D/L+D%L;
printf("%d\n",ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283601/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283601/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 compare_int(const void *a,const void *b){
return *(int*)a - *(int*)b;
}
int x[100000000];
int main(void){
int n;
int i,j;
int count = 1;
int ans = -1;
while(scanf("%d",&n)){
if(n == 0){
break;
}
if(n == 1){
scanf("%d",&x[0]);
printf("%d\n",x[0]);
conti... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283652/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283652/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int w,a,b,c=0;
scanf("%d %d %d",&w,&a,&b);
if(b-(a+w)<0&&a-(b+w)<0) printf("0");
else if(b-(a+w)>a-(b+w)){
printf("%d",b-(a+w));
}
else printf("%d",a-(b+w));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283702/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283702/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, a, b, d;
scanf("%d %d %d", &W, &a, &b);
d = (fabs(b - (a + W)) <= (fabs)(a - (b + W))) ? (b - (a + W)):(a - (b + W));
if(d > 0){
printf("%d\n", d);
} else {
printf("0\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283746/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283746/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,l,a,b,c,d,i,j,e,f,g,h,o,p;
scanf("%d\n",&l);
for(i=0;i<l;i++)
{
scanf("%d %d %d %d %d\n",&n,&a,&b,&c,&d);
e=a-b;
f=a+b;
g=c-d;
h=c+d;
o=n*e;
p=n*f;
if( (o>h) || (p<g) )
{
printf("No\n... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28379/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28379/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 argc, char const *argv[])
{
int W, a, b;
scanf("%d%d%d", &W, &a, &b);
if(a+W<b) {
printf("%d\n", b-W-a);
} else if (b+W<a) {
printf("%d\n", a-b-W);
} else {
printf("0\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283832/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283832/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 101
int main(){
int i,j,k,n,a,b,A[MAX],B[MAX][MAX];
scanf("%d",&n);
for(i=1; i<=n; i++)
scanf("%d%d",&A[i-1],&A[i]);
for(i=1; i<=n; i++)
B[i][i] = 0;
for(j=2; j<=n; j++){
for(i=1; i<=n-j+1; i++){
a = i + j -1;
B[i][a] = 1000000;
for(k=i; k<=a-... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283876/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283876/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[101];
int m[101][101];
void matrixChainOrder(int n){
int i,l,j,k,q;
for(l=2;l<=n;l++){
for(i=1;i<=n-l+1;i++){
j = i + l - 1;
m[i][j] = 100000;
for(k=i;k<j;k++){
q = m[i][k] + m[k+1][j] + p[i-1] * p[k] * p[j];
if(m[i][... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283919/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283919/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@m = dso_local local_unname... |
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
int mat(int *,int);
int main(){
int i,n,tmp;
int *p;
scanf("%d",&n);
p = malloc((n+1)*sizeof(int));
for(i=0;i<=n;i++)
{
if(i==0)
{
scanf("%d%d",&p[i],&p[i+1]);
i++;
continue;
}
scanf("%d%d",&tmp,&p[i]);
}
printf("%d\n"... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_283962/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_283962/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 M[100][100];
int p[101];
void m(int);
int main(){
int i, n;
scanf("%d", &n);
for(i = 0 ; i < n ; i++){
scanf("%d %d", &p[i], &p[i+1]);
}
m(n);
printf("%d\n", M[1][n]);
return 0;
}
void m(int n){
int i,j,b,a,q;
for(i = 1 ; i < n + 1 ; i++){
M[i][i] = 0;
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284026/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284026/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
int main() {
int t;
scanf("%d", &t);
while(t--) {
int a, b, c, d, i, n;
float weight;
bool flag=0;
scanf("%d %d %d %d %d", &n, &a, &b, &c, &d);
for(i = c-d; i <= c+d; i++) {
weight = (float) i / (float) n;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28407/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28407/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
void matrixChainOrder(void);
int num,p[101],m[101][101];
int main(){
int i,a;
scanf("%d",&num);
for(i=0;i<num-1;i++)scanf("%d%d",&p[i],&a);
scanf("%d%d",&p[num-1],&p[num]);
matrixChainOrder();
printf("%d\n",m[1][num]);
return 0;
}
void matrixChainOrder(void){
int i,n,l,j,k,q;
n =nu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284127/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284127/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 100
int main(){
int n,A[MAX+1],B[MAX+1][MAX+1];
int i,j,k,u,sum;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&A[i-1],&A[i]);
}
for(i=1;i<=n;i++)B[i][i]=0;
for(u=2;u<=n;u++){
for(i=0;i<=n-u+1;i++){
j = i+u-1;
B[i][j] = (1<<21);
for(k=i;k<=j-1;k++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284170/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284170/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
if (a>b)
return b;
else
return a;
}
int main(){
int i, j, k, l, n, x[1000][2], m[1000][1000], dp[1000][1000], p[1000];
scanf("%d", &n);
for (i=0; i<n; i++)
scanf("%d %d", &x[i][0], &x[i][1]);
p[0]=x[0][0];
for(i=0; i<n; i++){
p[i+1]=x[i][1];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284213/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284213/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 101
int dp[MAX+1][MAX+1],p[MAX+1];
int Min(int a,int b){
int tmp;
if(a<b) return a;
return b;
}
int main(){
int n,i,j,r,k;
scanf("%d",&n);
for(i=1;i<n+1;i++)
scanf("%d%d",&p[i-1],&p[i]);
for(i=2;i<n+1;i++){
for(j=1;j<n-i+2;j++){
int r=j+i-1;
dp[j][r]=(1<... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284257/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284257/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 int t,n,a,b,c,d,gw_min,bw_min,gw_max,bw_max;
scanf("%lld",&t);
while(t--){
scanf("%lld",&n);
scanf("%lld",&a);
scanf("%lld",&b);
scanf("%lld",&c);
scanf("%lld",&d);
gw_min=a-b;
gw_max=a+b;
bw_min=c-d;
bw_max=c+d;
if((... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28430/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28430/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 i, j, n, m[100][100], p[100], a, l, k, q=0;
scanf("%d", &n);
for(i = 0; i < n; i++){
if(i < n - 1) scanf("%d%d", &p[i], &a);
else scanf("%d%d", &p[i], &p[i + 1]);
}
for(i = 1; i <= n; i++){
for(j = 1; j <= n; j++){
m[i][j] = 0;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284350/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284350/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,l,k,j,i,m[101][101],p[101],min;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d%d",&p[i-1],&p[i]);
}
for(i=1;i<=n;i++){
m[i][i]=0;
}
for(l=2;l<=n;l++){
for(i=1;i<=n-l+1;i++){
j=i+l-1;
m[i][j]=2000000000;
for(k=i;k<=j-1;k++){
min=m[i][k]+m[k+1][j]+p[i-1]*p[k]*p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284400/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284400/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int n,m,i,l,j,k,q;
int M[102],MM[102][102];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d",&M[i],&m);
}
M[n]=m;
for(i=1;i<n+1;i++)MM[i][i]=0;
for(l=2;l<n+1;l++){
for(i=1;i<n-l+2;i++){
j=i+l-1;
MM[i][j]=10000000000;
for(k=i;k<=j-1;k++){
q=(MM[i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284444/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284444/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
void matrixChainOrder(int);
int min(int,int);
int p[101],m[101][101];
int main(){
int c,i,n,r;
scanf("%d",&n);
for(i=0;i<n;i++) scanf("%d%d",&p[i],&p[i+1]);
matrixChainOrder(n);
printf("%d\n",m[1][n]);
return 0;
}
void matrixChainOrder(int n){
int i,j,k,l,q;
for(i=1;i<=n;i++) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284488/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284488/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define MAX 100
int main()
{
int n,i,j,k,l,min,q;
scanf("%d\n",&n);
int M[MAX+1][MAX+1],p[MAX+1],A[MAX],B[MAX];
for(i=0;i<n;i++)
{scanf("%d %d \n",&A[i],&B[i]); }
p[0]=A[0];
for(i=1;i<=n;i++)
p[i]=B[i-1];
n++;
for(i=0;i<n;i++)M[i][i]=0;
for(i=2;i<n;i++)
{for(j=1;j<n-i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284530/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284530/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n;
int m[100][100];
int p[100][2];
int matrix(void);
int main()
{
int i;
scanf("%d",&n);
for(i = 1;i <= n;i++){
scanf("%d %d",&p[i][0],&p[i][1]);
}
p[0][1] = p[1][0];
printf("%d\n",matrix());
return 0;
}
int matrix(void)
{
int i,l,j,k,q;
for(i = 1;i <= n;i++) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284574/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284574/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define N 100
//#include<algorithm>
//using namespace std;
int main() {
int n, p[N+1], m[N+1][N+1],i,l,j,k;
scanf("%d",&n);
for(int i=1;i<=n;i++){
scanf("%d%d",&p[i-1],&p[i]);
}
for( i=1;i<=n;i++) m[i][i]=0;
for( l=2;l<=n;l++) {
for( i=1;i<=n-l+1;i++){
j=i+l-1;
m[i][... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284617/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284617/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 M 100
int main() {
int i,j,a,b,n,g[M], m[M][M],u;
scanf("%d",&n);
for (i=1;i<=n;i++)
{
scanf("%d%d",&g[i-1],&g[i]);
}
for(i=1;i<=n;i++) m[i][i]=0;
for(b=2;b<=n;b++)
{
for(i=1;i<=n-b+1;i++)
{
j=i+b-1;
m[i][j]=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284660/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284660/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
static const int N=100;
int min(int,int);
int main(){
int n,i,k;
scanf("%d",&n);
int A[N+1];
for(i=1;i<=n;i++){
scanf("%d%d",&A[i-1],&A[i]);
}
int m[N+1][N+1],s;
for(i=1;i<=n;i++){
m[i][i]=0;
}
for(s=2;s<=n;s++){
for(i=1;i<=n-s+1;i++){
int j=i+s-1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284710/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284710/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m, int a)
{
if (m > a)
m = a;
return m;
}
int main(void) {
int i, j, k, l, num, n;
int a[200];
int m[200][200];
scanf("%d", &num);
for (i = 0; i < num; i++)
scanf("%d %d", &a[i], &a[i + 1]);
for (l = 2; l <= num; l++)
{
for (i = 1; i <= num - l + 1; i++)
{
j = i ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284754/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284754/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
static int Num=100;
int main(){
int i,h,j,k,n,p[Num+1],m[Num+1][Num+1];
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d",&p[i-1]);
scanf("%d",&p[i]);
}
for(i=1;i<=n;i++)m[i][i]=0;
for(h=2;h<=n;h++){
for(i=1;i<=n-h+1;i++){
j=i+h-1;
m[i][j]=1<<21... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284798/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284798/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <limits.h>
int *p;
int **m;
void init(int n){
int i;
p = (int*)malloc(sizeof(int) * (n + 1));
m = malloc(sizeof(int*) * (n + 1));
for(i=0; i<=n; i++){
m[i] = malloc(sizeof(int) * (n + 1));
}
}
int min(int a, int q){
if (a>q){
return q;
}
}
void m... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284840/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284840/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@p = dso_local local_unname... |
#include<stdio.h>
int main(void){
int s,m,l,c;
scanf("%d %d %d",&s,&m,&l);
if(s>m){
c=s;
s=m;
m=c;
}
if(s>l){
c=s;
s=l;
l=c;
}
if(m>l){
c=m;
m=l;
l=c;
}
printf("%d %d %d\n",s,m,l);
return(0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284884/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284884/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a <= b && a <= c) {
if (b <= c) {
printf("%d %d %d\n", a, b, c);
} else {
printf("%d %d %d\n", a, c, b);
}
}
else if (b <= c && b <= a) {
if (a <= c) {
printf("%d %d %d\n", b, a, c);
} else {
printf("%d %d %d\... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284927/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284927/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, temp;
scanf("%d %d %d", &a, &b, &c);
if ( a > b ) {
temp = a;
a = b;
b = temp;
}
if ( b > c ) {
temp = b;
b = c;
c = temp;
}
if ( a > b ) {
temp = a;
a = b;
b = tem... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_284970/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_284970/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
long hash[2005]={0};
int main()
{
long x;
long i;
long flag=0;
do
{
scanf("%ld",&x);
hash[x]=1;
}while(scanf(",")!=EOF);
for(i=1;i<=1001;i++)
if(hash[i-1]==0&&hash[i]==1)
{
if(flag)
printf(",");
if(hash[i+1]==0)
{
printf("%ld",i);
flag=1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28502/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28502/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@hash = dso_local local_unnam... |
#include <stdio.h>
int main( void )
{
int a,b,c;
scanf("%d %d %d",&a,&b,&c);
while( a>b || b>c )
{
if( a>b )
{
int buf = a;
a = b;
b = buf;
}
if( b>c )
{
int buf = b;
b = c;
c = buf;
}
}
printf("%d %d %d\n",a,b,c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285063/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285063/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
void swap(int *a,int *b){
int t=*a; *a=*b; *b=t;
}
int main(void){
int a,b,c;
scanf("%d %d %d", &a, &b, &c);
if(a>b) swap(&a,&b);
if(b>c) swap(&b,&c);
if(a>b) swap(&a,&b);
printf("%d %d %d\n", a, b, c);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285106/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285106/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num[3];
int i, j;
int buf;
scanf(" %d %d %d ", &(num[0]), &(num[1]),&(num[2]) );
for(i=0; i<2; i++){
for(j=i; j<3; j++){
if(num[i] > num[j] )
{buf = num[i]; num[i] = num[j]; num[j] = buf;}
}
}
printf("%d %d %d\n", num[0], num[1], num[2]);
return 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285164/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285164/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 num[3], copy;
int i, j;
for(i = 0; i < 3; i++){
scanf("%d", &num[i]);
}
for(i = 0; i < 2; i++){
for(j = 0; j < 2; j++){
if(num[j] > num[j + 1]){
copy = num[j];
num[j] = num[j + 1];
num[j + 1] = copy;
}
}
}
for(i = 0; i < 3; i++){
printf("%d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285214/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285214/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a, b, c;
int i, tmp;
scanf("%d %d %d", &a, &b, &c);
for(i = 0; i<2; i++){
if(a>b){
tmp = a;
a = b;
b = tmp;
}
if(b>c){
tmp = b;
b = c;
c = tmp;
}
}
printf("%d %d %d\n", a, b, c);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285265/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285265/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
int string_compare(const void *a, const void *b)
{
return(strcmp((char *)a, (char *)b));
}
int main(void){
int N, L;
scanf("%d%d", &N, &L);
char S[N][L+1];
for(int i = 0; i < N; i++){
scan... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285315/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285315/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int N, L;
scanf("%d%d", &N, &L);
char str[N][L+1];
for(i=0; i<N; i++){
scanf("%s", str[i]);
}
char anstr[N*L+1];
char tmp[L+1];
for(i=0; i<N; i++){
for(j=i; j<N; j++){
if(strcmp(str[i], str[j]) > 0){
strcpy(tmp... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285359/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285359/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
void test_sort(char a[][110], int l, int r);
int main(void)
{
char test[110][110];
int n, l;
scanf("%d %d", &n, &l);
for (int i=0; i < n; i++) {
scanf("%s", test[i]);
}
test_sort(test,0,n);
for (int i=0; i < n; i++) {
printf("%s", test[i]);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285401/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285401/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 cmpstr(const void * a, const void * b){
const char *x = a, *y = b;
return strcmp(x, y);
//return 0;
}
int main(){
int n, l;
scanf("%d %d", &n, &l);
char s[n][l+1];
for(int i = 0; i < n; ++i){
scanf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285445/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285445/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
char s[110][11000];
char temp[11000];
int main(){
int n,l;
while(~scanf("%d%d",&n,&l)){
for(int i=0;i<n;i++){
scanf("%s",s[i]);
}
for(int i=0;i<n-1;i++){
for(int j=0;j<n-1-i;j++){
if(strcmp(s[j],s[j+1])>0){
memset(temp,'\0',sizeof(temp));
strcpy(temp,s[j]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285489/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285489/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
int n,l;
scanf("%d",&n);
scanf("%d",&l);
char s[n][l+1];//EOS
int i;
for(i = 0; i < n; i++){
scanf("%s",s[i]);
}
char a[l+1];
int p,q;
int j;
for(p = 0; p < n; p++){
for(q = 0; q < n-1-p; q++){
j = 0;
while(s[q][j] == s[q+1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285531/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285531/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h> // uint64_t
#define max(a,b) ((a) > (b) ? (a) : (b))
#define min(a,b) ((a) > (b) ? (b) : (a))
#define BUF_SIZE (1000000+50)
// size: specify sizeof(str)
int get_str(char *str, int size) {
if(!fgets(str, size, stdin)) return -1;
ret... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285575/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285575/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unn... |
#include <stdio.h>
#include <stdlib.h>
int top, S[1000];
void push(int);
int pop();
int main(void)
{
top = 0;
char str[100];
int x, y;
while (scanf("%s", str) != EOF) {
if (str[0] == '+') {
x = pop();
y = pop();
push(x + y);
} else if (str[0] == '... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285625/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285625/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
static int pos = 0;
static int stack[100];
void push(int i){
stack[pos++] = i;
}
int pop(void){
return stack[--pos];
}
int main(void){
char str[16];
while (scanf("%s ", str) != EOF){
int a,b;
switch (str[0]) {
case '*':
case '+':
case '-':
a ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285669/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285669/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stack = internal unnamed_a... |
#include<stdio.h>
#include<stdlib.h>
#define N 100
int top=0;
int push(int);
int pop(void);
int main(){
int x,y,e;
char data[N],d,c;
while(scanf("%s",data)!=EOF){
if(data[0]== '+'){
x =pop();
y =pop();
push(y+x);
}
else if(data[0]== '-'){
x = pop();
y =pop();
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285726/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285726/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 1000
int top, new_num[MAX];
void push(int);
int pop(void);
int isEmpty(void);
int isFull(void);
int main(){
int x, y, X;
char num[MAX];
/*スタックポインタを表す整数型変数*/
top = 0;
while( scanf("%s", num) != EOF ){
if ( num[0] == '+' ){
x = po... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285799/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285799/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 1000
void initialize();
int isEmpty();
int isFull();
void push(int x);
int pop();
int top;
int S[100];
int main(){
int x,n1,n2;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
n1 = pop();
n2 = pop();
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285841/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285841/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
void push(int);
int pop(void);
int top,S[100];
int main(){
int a,b;
char x[100];
top=0;
while(scanf("%s",x)!=EOF){
if(x[0]=='+'){
a=pop();
b=pop();
push(a+b);
}
else if(x[0]=='-'){
b=pop();
a=pop();
pus... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285885/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285885/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int top, S[1000];
void push(int x){
top++;
S[top] = x;
}
int pop(){
top--;
return S[top+1];
}
int main(void) {
int a,b;
top=0;
char s[100];
while( scanf("%s",s) != EOF){
if( s[0]=='+'){
a = pop();
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285935/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285935/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top,S[1000];
void push(int x){
S[++top] = x;
}
int pop(){
top--;
return S[top+1];
}
int main(){
int a,b;
top = 0;
char s[100];
while(scanf("%s",s) != EOF){
if(s[0] == '+'){
a = pop();
b = pop();
push(a+b);
}
else if(s[0] == '-'){
b = pop();
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_285993/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_285993/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@S = dso_local local_unname... |
#include <stdio.h>
#include <stdlib.h>
int top = -1, S[105];
void push(int x){
top++;
S[top] = x;
}
int pop(){
top--;
return S[top+1];
}
int main(void)
{
char data[10];
int S[105], a, b, n;
while(scanf("%s", data) != EOF){
if(data[0] == '+'){
a = pop();
b = pop();
push(b+a);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286035/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286035/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int pop(void);
void push(int);
int array[1000],top;
int main()
{
int a,b;
char s[100];
top=0;
while(scanf("%s ", s)!= EOF){
if (s[0]=='+')
{
a=pop();
b=pop();
push(a+b);
}
else if(s[0]=='-')
{
b... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286079/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286079/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top, S[1000];
void push(int);
int pop();
int isempty(void);
int isfull(void);
int main(){
int x;
int a, b;
char s[100];
top = 0;
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
a = pop();
b = pop();
push(a + b);
} e... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286121/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286121/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <math.h>
int main(){
int n,m,i,j, k;
char s[100];
int sol[50];
int yesOccured = 0;
int maxUsed = 1;
scanf("%d %d" , &n, &m);
sol[0] = 1;
j=1;
for (i = 1; i<=n+1-m; i++){
scanf("%s", s);
if (s[0] == 'Y'){
if(!yesOccured){
for (k = j;k <j+m-1; k++){
sol[k] = sol... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28618/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28618/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
#define STACK_SIZE 100 /* ??????????????????????????¨?????§???????????????????????§?????° */
#define SUCCESS 1 /* ?????? */
#define FAILURE 0 /* ??±??? */
typedef int data_t; /* ??????????????????????????????????????? */
data_t stack_data[STACK_SIZE]; ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286222/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286222/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stack_num = dso_local loca... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int pop(void);
void push(int);
int top=0, Arr[1000];
int main()
{
int a, b;
char c[100];
while( scanf("%s", c) != EOF ){
if( c[0] == '+' ){
a = pop();
b = pop();
push(a + b);
}
else if( c[0] == '-' ){
b = pop();... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286266/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286266/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#define MAX 1000
int top=0;
int S[MAX];
void push(int x);
int pop();
int main(){
int a,b;
char str[MAX];
while(scanf("%s",str)!=EOF){
if(str[0]=='+'){
a=pop();
b=pop();
push(b+a);
}else if(str[0]=='-'){
a=pop();
b=pop();
push(b-a);
}else if(str[0]=='*... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286323/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286323/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int top, S[1000];
void push(int x){
/* topを加算してからその位置へ挿入 */
S[++top] = x;
}
int pop(){
top--;
/* topが指していた要素を返す */
return S[top+1];
}
int main(){
int a, b;
top = 0;
char s[100];
while(scanf("%s", s) != EOF){
if(s[... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286389/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286389/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@S = dso_local local_unname... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int top, N[1000];
void push(int);
int pop(void);
int main(){
int x,y;
char n[100];
top = 0;
while(scanf("%s", n) != EOF){
if(n[0] == '+'){
x = pop();
y = pop();
push(x + y);
}
else if(n[0] == '-'){
y = pop();
x... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286446/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286446/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
const int MAX = 102;
int main (){
int i,n,m,sum = 0;
char a[MAX][MAX];
for (i=0;i<MAX;i++){
int j;
for(j=0;j<MAX;j++)
a[i][j] = 0;
}
scanf("%d %d\n",&n,&m);
for (i=1;i<=n;i++){
int j;
for(j=1;j<=m;j++){
char c;
scanf("%c",&c);
if (c == '.')
a[i][j] = 0;
else
if (c == '*'){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28649/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28649/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@MAX = dso_local local_unname... |
#include<stdio.h>
#include<stdlib.h>
int cmp(const void *a,const void *b)
{
return (*(int *)a-*(int *)b);
}
int main()
{
int n,arr[100000];
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&arr[i]);
}
qsort(arr,n,sizeof(int),cmp);
if(n%2==0)
{
printf("%d\n",arr[(n/2)-1]);
}
else
{
printf("%d\n",arr[(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28654/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28654/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
/*スタック*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main (){
int x; //整数を格納する変数
char s[100]; //文字列配列
int n[100]; // 整数を格納するスタック
int i;
i=0;
while( scanf("%s", s) != EOF){
switch(s[0]){
case '+':
n[i-2] += n[i-1];
i--;
break;
case '-':
n[i-2] -... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286590/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286590/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <strings.h>
int stack[1000],top=0;
void push(int x)
{
stack[++top] = x;
}
int pop()
{
top--;
return stack[top+1];
}
int main()
{
char s[100];
int x,y;
while(scanf("%s",s) != EOF){
if(s[0] == '+'){
x = pop();
y = pop();
push(x + y);
}else if(s[0] ==... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286633/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286633/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
int main(){
int a[128] = {}, i = 0, x, y;
char in[100];
while(scanf("%s", in) != EOF){
switch(*in){
case '+':
x = a[--i];
y = a[--i];
a[i++] = y + x;;
break;
case '-':
x = a[--i];
y = a[--i];
a[i++] = y - x;
break;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286677/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286677/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){
int num[100];
int i=0;
char s[100];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
num[i-2] += num[i-1];
i = i-1;
} else if ( s[0] == '-' ){
num[i-2] -= num[i-1];
i = i-1;
} else if ( s[0] == '*' ){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286734/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286734/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 top, S[1000];
void push(int x)
{
S[++top] = x;
}
int pop()
{
top--;
return S[top + 1];
}
int main()
{
int a, b;
top = 0;
char s[100];
while (scanf("%s", s) != EOF)
{
char str = s[0];
if (str == '+' || st... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286778/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286778/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@S = dso_local local_unname... |
#include <stdio.h>
#include <stdlib.h>
#define MAXN 2000
// ノードを表す構造体
struct Node {
int data ;
struct Node * next ;
} ;
typedef struct Node Node ;
// 新しいノードのメモリを確保する
Node *create_node(int new_data) {
Node *new_node = (Node *) malloc(sizeof(Node));
if (!new_node) {
fprintf(stderr, "could not allocate a no... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286820/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286820/source.c"
target datalayout = "e-m:e-p270: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>
int stack[1000];
int t;
void push(int x){
stack[++t]=x;
}
int pop(){
t--;
return stack[t+1];
}
int main()
{
int n,m;
t=0;
char s[100];
while(scanf("%s",s)!=EOF){
if(s[0]=='+'){
n=pop();
m=pop();
push(n+m);
}
else... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286871/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286871/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stack = dso_local local_un... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 1000
int top,S[1000];
void initialize();
int isEmpty();
int isFull();
void push(int x);
int pop();
int main(){
int x,i,j;
top=0;
char s[1000];
while( scanf("%s", s) != EOF ){
if ( s[0] == '+' ){
i=pop();
j=pop();
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286929/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286929/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#define MAX 200
void push(int);
int pop(void);
int top=0;
int stack[MAX];
int main(){
int a,b,x;
char s[100];
while(scanf("%s",s)!=EOF){
if(s[0]=='+') {
b=pop();
a=pop();
a+=b;
push(a);
}
else if(s[0]=='-'){
b=pop();
a=pop();
a-=b;
push(a);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_286972/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_286972/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void push(int);
int pop(void);
int top,X[1000];
int main(){
int x,y,n,m;
char s[100];
top=0;
while( scanf("%s",s) != EOF){
if ( s[0] == '+' ){
n=pop();
m=pop();
push(n+m);
} else if ( s[0] == '-' ){
n=pop();
m=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287029/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287029/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@top = dso_local local_unna... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int top, S[1000];
void push(int x) {
S[++top] = x;
}
int pop() {
top--;
return S[top+1];
}
int main()
{
int a, b;
top = 0;
char s[100];
while(scanf("%s", s) != EOF) {
if(s[0] == '+') {
a = pop();
b = pop();
push(a+b);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287072/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287072/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@S = dso_local local_unname... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define STACK_SIZE 100
typedef struct{
int s[STACK_SIZE];
int top;
}stack_t;
void stack_push(int n, stack_t* st){
if(st->top>=STACK_SIZE-1){
printf("error: full stack\n");
}else{
st->top++;
st->s[st->top]=n;
}
}
int stack_pop(stack_t* st){
if(st->top... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287115/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287115/source.c"
target datalayout = "e-m:e-p270: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.stack_t = type { [1... |
#include <stdio.h>
int main(void) {
int stack[100], value, i, top = -1;
char in[10];
while (scanf("%s ", in) != EOF) {
if ('0' <= in[0] && in[0] <= '9') {
for (value = i = 0; in[i] != '\0'; i++) {
value *= 10;
value += in[i] - '0';
}
stack[++top] = value;
} else if (in[0] == '+') {
stack[to... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287159/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287159/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.