Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
int main(void){
int A,B,C,D,X=0;
scanf("%d\n%d\n%d\n%d",&A,&B,&C,&D);
if(A<B){
X+=A;
}else{
X+=B;
}
if(C<D){
X+=C;
}else{
X+=D;
}
printf("%d\n",X);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233374/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233374/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
printf("%d",(a<b?a:b)+(c<d?c:d));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233424/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233424/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4]={};
for(int i = 0; i < 4; i++){
scanf("%d", &a[i]);
}
int cost = 0;
if(a[0] < a[1]){
cost = cost + a[0];
}else{
cost = cost + a[1];
}
if(a[2]<a[3]){
cost = cost + a[2];
}else{
cost = cost + a[3];
}
printf("%d", cost);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233475/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233475/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d %d %d %d",&A,&B,&C,&D);
int sum;
if(A<B){
sum=sum +A;
}
else{
sum+=B;
}
if(C<D){
sum+=C;
}
else{
sum+=D;
}
printf("%d",sum);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233518/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233518/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a>b)
a=b;
if(c>d)
c=d;
printf("%d",a+c);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233561/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233561/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#define INIT_CAP 10
#define INF 1000000000
#define min(a, b) (((a) < (b)) ? (a) : (b))
const int di[4] = {-1, 0, 1, 0}, dj[4] = {0, 1, 0, -1};
typedef struct {int to, w;} Edge;
typedef struct {Edge *elem; int cap, size;} VecEdge;
typedef struct {int num, d;} PNumDis;
VecEdge ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233604/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233604/source.c"
target datalayout = "e-m:e-p270: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.VecEdge = type { pt... |
#include<stdio.h>
int main(){
int n,k,i,j,buff,swi;
int s[100];
while(1){
swi=0;
scanf("%d%d",&n,&k);
if(n==0&&k==0)
return 0;
for(i=0;i<k;i++)
scanf("%d",&s[i]);
//input the s[i]
for(i=0;i<n;i++)
for(j=0;j<k;j++){
scanf("%d",&buff);
s[j]-=buff;
}
//input ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233662/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233662/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
// AOJ 0253 Ant Nest
// 2018.3.14 bal4u
#include <stdio.h>
#include <math.h>
#define LIM 40
#define EPS 1e-6
typedef struct { double x, y; } PP;
typedef struct { PP s, e; } SEG, LINE;
#define EQ(a,b) (fabs((a)-(b))<EPS)
int dcmp(double x) { if (fabs(x) < EPS) return 0; return x <= 0 ? -1 : 1; }
PP vadd(PP p1, PP p... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233712/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233712/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.PP = type { double,... |
#include<stdio.h>
int main(void)
{
int i;
char c1,c2;
scanf("%c",&c1);
for(i=0;i<3;i++){
scanf("%c",&c2);
if(c1==c2){
printf("Bad");
return 0;
}
c1=c2;
}
printf("Good");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233756/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233756/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long long int n,s,ans;
scanf("%I64d",&n);
s=(n*(n+1))/2;
if(s%2==0)
{
printf("0\n");
}
else
{
printf("1\n");
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2338/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2338/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr co... |
#include <stdio.h>
int main(){
char a[100];
int i;
scanf("%s",a);
for(i=0;i<3;i++){
if(a[i]==a[i+1]){
printf("Bad\n");
return 0;
}
}
printf("Good\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233864/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233864/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
char str[10];
for(i=0;i<10;i++)
scanf("%s",str);
if(str[0]==str[1]||str[1]==str[2]||str[2]==str[3])
printf("Bad");
else
printf("Good");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233907/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233907/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main (void){
char a[100];
int b=0;
for(int i=0;i<4;i++){
scanf("%s",&a[i]);
if(a[i]==a[i+1]){
b=1;
}
}
printf("%s",(b==1)?"Bad":"Good");
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233950/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233950/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include <stdlib.h>
#include <math.h>
int main(void)
{
long int n, l;
long int i, j;
long int min_abs = 1000;
long int min;
char s[5];
scanf("%s", s);
for(i = 0; i < 3; i++) {
if(s[i] == s[i + 1]) {
printf("Bad\n");
return 0;
}
}
pr... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_233994/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_233994/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t[4];
scanf("%s",&t);
if(t[0]==t[1]|| t[1]==t[2]||t[2]==t[3]){
printf("Bad\n");
}
else{
printf("Good\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234036/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234036/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 arr[10000];
int main()
{
int l,m,i,j,n,k,flag=0,flag2=0,div_len;
scanf("%s",arr);
l=strlen(arr);
scanf("%d",&k);
div_len=l/k;
if(l%k==0)
{
if(div_len==1)
printf("YES\n");
else
{
for(i=0;i<l;i=i+div_len)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23408/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23408/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
//Security
#include<stdio.h>
int main(){
char s[4];
scanf("%s",s);
for(int i=0;i<3;i++){
if(s[i]==s[i+1]){
printf("Bad\n");
return 0;
}
}
printf("Good\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234122/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234122/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
char s[10];
scanf("%s",s);
if(s[0]==s[1] || s[1]==s[2] || s[2] == s[3]){
printf("Bad\n");
}else{
printf("Good\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234166/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234166/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int x,i=1;
scanf("%d",&x);
for(;i*(i+1)/2<x;i++);
printf("%d",i);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234209/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234209/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sl(x) scanf("%ld", &x)
#define ss(x) scanf("%s", x)
#define pl(x) printf("%ld\n", x)
#define pd(x) printf("%lf\n", x)
#define ps(x) printf("%s\n", x)
#define INF 1000000000000000000
#define MOD 1000000007
#define MIN(a,b) (((a)<(b))?... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234252/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234252/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(void) {
int a[3],b[3];
int i;
int k,l,m,n;
k=0;
l=0;
m=0;
n=0;
for(i=0;i<3;i++){
scanf("%d %d",&a[i],&b[i]);
if(a[i]==1){
k++;
}
if(a[i]==2){
l++;
}if(a[i]==3){
m++;
}if(a[i]==4){
n++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234302/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234302/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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],b[3],i,j,jud=0,c[4];
for(i=0;i<3;i++)
{
scanf("%d%d",&a[i],&b[i]);
c[i]=0;
}
c[3]=0;
for(i=0;i<3;i++)
{
c[a[i]-1]++;
c[b[i]-1]++;
}
for(i=0;i<4;i++)
{
if(c[i]==0 || c[i]==3) jud=-1;
}
if(jud==0) printf("YES");
else printf("NO");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234346/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234346/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <math.h>
#include <stdio.h>
#define EPS 1e-10
int rel_s_s( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, double *x, double *y ) {
double dn = ( x2 - x1 ) * ( y4 - y3 ) - ( x4 - x3 ) * ( y2 - y1 );
double nm = ( x3 - x1 ) * ( y4 - y3 ) - ( x4 - x3 ) * ( y3 - y1 );
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234397/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234397/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#define mod 1000000000+7
#define N 400000+5
#define rep(i,n) for(i=0;i<n;i++)
#define rrep(i,n) for(i=n-1;i>=0;i--)
typedef long long ll;
int min(int,int);
int max(int,int);
int cmp(const void*,const void... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23444/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23444/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
#define max_size (int)(2e5 + 1)
int main(){
int i, S = 0, ans = 0;
char *X = (char *)malloc(sizeof(char) * max_size);
scanf("%s", X);
for(i = 0; X[i] != '\0'; i++){
if(X[i] == 'S'){
S++;
}
else{
if(S > 0){
S--;
}
else{
ans++;
}
}
}
printf("%d\... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234490/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234490/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int c[20];
int a[20][20];
int main(){
int n,m,x;
scanf("%d%d%d",&n,&m,&x);
for(int i=0;i<n;i++){
scanf("%d",c+i);
for(int j=0;j<m;j++)scanf("%d",&a[i][j]);
}
int ans=1e9;
for(int b=0;b<1<<n;b++){
int temp[20]={};
int c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234540/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234540/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#define rep(i,n)for(int i=0;i<(int)(n);i++)
int main(){
int n,m,x,c[12]={0},a[12][12]={0},y,z[12],b,d=2e9;
scanf("%d%d%d",&n,&m,&x);
rep(i,n){
scanf("%d",&c[i]);
rep(j,m){
scanf("%d",&a[i][j]);
}
}
rep(i,2){rep(j,2){rep(k,2){rep(l,2){rep(o,2){rep(p,... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234584/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234584/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int n,m,x; //n:ほんの数 //m:アルゴリズムの数
scanf("%d%d%d",&n,&m,&x);
int c[n];
int a[n][m];
for(int i=0;i<n;i++){
scanf("%d",&c[i]);
for(int j=0;j<m;j++){
scanf("%d",&a[i][j]);
}
}
long money=0,min=10000000,skill[m];
int flag2=0;
for(int i=0;i<(1<<n);i++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234627/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234627/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 kugyu(const void* asumisu, const void* kitaeri) {
int tomatu = *(const int*)asumisu, iguti = *(const int*)kitaeri;
return tomatu < iguti ? -1 : tomatu > iguti;
}
int n;
int a[114514];
int main(void) {
int i;
int score = 0;
int value = 0;
if (scanf("%d", &n) != 1) retu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234678/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234678/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// 内部定数
#define D_DAY_MAX 100 // 最大日数
// 内部変数
static FILE *szpFpI; // 入力
static int si1Stock[D_DAY_MAX]; // 株価
static int siDCnt; // 日数
// 内部変数 ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234728/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234728/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
long long n;
scanf("%lld",&n);
long long a[n+1];
for(long long i=1;i<=n;i++)scanf("%lld",&a[i]);
long long money=1000,kabu=0;
long long min[40],max[40],m=0,M=0;
for(long long i=1;i<=40;i++){
min[i]=0;
max[i]=0;
}
if(a[1]<a[2]){min[1]=1;m+=1;}
for... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234771/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234771/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 <math.h>
int main(void){
double i,n,p,ans=0;
scanf("%lf %lf",&n,&p);
if(n==1)ans=p;
else if(n>=40 || n>=p)ans=1;
else if(n==2){
for(i=1; i<=1000000; i++){
if(fmod(p,pow(i,2))==0)ans=i;
}
}
else if... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234814/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234814/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i;
scanf("%d %d",&a,&b);
if(1<b&&b<2*a-1){
printf("Yes\n");
for(i=0;i<2*a-1;i++)printf("%d\n",(i+b+a-1)%(2*a-1)+1);
}
else printf("No\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234865/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234865/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i;
double f;
int count = 0;
scanf("%d", &n);
//1からNまでの数で奇数をカウントする
for (i = 1; i <= n; i++) {
if (i % 2 != 0) {
count++;
}
}
f = (double)count / n;
printf("%f", f);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234908/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234908/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<math.h>
#define rep(i,n) for(i=0; i<n; i++)
int main(void)
{
int n;
scanf("%d", &n);
double m=n;
if(n%2 == 0){
printf("%.10lf", 0.5000000000);
}else{
printf("%.10lf", ((m-1)/2+1)/m);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234951/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234951/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void)
{
int n;
scanf("%d",&n);
if(n%2==0)printf("0.5\n");
else printf("%lf\n",(n/2+1)/(double)n);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_234995/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_234995/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int n;
scanf("%d", &n);
if (n%2 == 0){
printf("%lf", 0.5);
}
else{
printf("%lf", ((double) (n+1)/2)/n);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235037/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235037/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
double k,sum=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
if (i%2!=0)
sum=sum+1;
k=sum/n;
printf("%.10f",k);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235080/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235080/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d",&a);
printf("%f",(a/2+a%2)/(double)a);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235123/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235123/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int n;
scanf("%d",&n);
int n1;
n1=n/2;
if(n%2==0){
printf("%f\n",(float)n1/n);
}
else{
printf("%f\n",(float)(n1+1)/n);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235167/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235167/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
long l,r,x,y,e;
long i;
scanf("%ld%ld%ld%ld%ld",&l,&r,&x,&y,&e);
for (i=l;i<=r;i++)
if (i/e>=x && i/e<=y && i%e==0)
{
printf("YES\n");
return 0;
}
printf("NO\n");
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23521/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23521/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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){
double input=0,num=0;
scanf("%lf",&input);
for(int i=1;i<=input;i++)
if(i%2)
num++;
double score=num/input;
printf("%lf",score);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235253/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235253/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,cnt1=0,cnt2=0;
scanf("%d",&n);
for(int i=1;i<=n;i++){
if(i%2==1){
cnt1++;
}
cnt2++;
}
printf("%.10f",(double)cnt1/cnt2);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235297/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235297/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, D, n, x, y, r, s, i, ans = 0;
scanf("%d %d", &R, &D);
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf("%d %d %d", &x, &y, &r);
if ((s = x * x + y * y) >= (R - D + r) * (R - D + r) && s <= (R - r) * (R - r))
ans++;
}
printf("%d\n", ans);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23534/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23534/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 min(p,q)((p)<(q)?(p):(q))
int a[100010];
int main(){
int n,q;
scanf("%d%d",&n,&q);
for(int i=0;i<n;i++)scanf("%d",a+i);
while(q--){
long s;
scanf("%ld",&s);
long ans=0;
int r=0;
long sum=0;
for(int l=0;l<n;l++){
while(r<n&&sum<=s)sum+=a[r++];
ans+=r-l-(sum>s);
sum-=a... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235390/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235390/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
//ABC176C
int main(void) {
long long n, k, i, cou=0, tmp;
scanf("%lld", &n);
long long a[n];
scanf("%lld", &a[0]);
for(i=1; i<n; i++){
scanf("%lld", &a[i]);
if(a[i]<a[i-1]) cou+=a[i-1]-a[i], a[i]=a[i-1];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235440/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235440/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// 内部変数
static FILE *szpFpI; // 入力
// 内部変数 - テスト用
#ifdef D_TEST
static int siRes;
static FILE *szpFpA;
static int siTNo;
#endif
// 1行出力
int
fOutLine(
char *pcpLine //... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235491/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235491/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
void swap (int *x, int *y) {
int temp;
temp = *x;
*x = *y;
*y = temp;
return;
}
int gcd(int a,int b){
if(a<b){
swap(&a,&b);
}
if(b==0){
return a;
}
int r=a%b;
while(r!=0){
a = b;
b = r;
r = (a%... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235534/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235534/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ans=0,N,ai,i,max=0;
scanf("%ld",&N);
for(i=0;i<N;i++){
scanf("%ld",&ai);
if(ai>max) max=ai;
else if(ai<max) ans+=(max-ai);
}
printf("%ld\n",ans);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235585/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235585/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main() {
long long int n, a[200000], max[200000] = { 0 }, t = 0;
long long int ans = 0;
scanf("%lld", &n);
for (int i = 0; i < n; i++)scanf("%lld", &a[i]);
max[0] = a[0];
for (int i = 1; i < n; i++) {
if (a[i] > max[t]) {
max[i] = a[i];
t = i;
}
else max[i] = max[t];
}
for (i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235628/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235628/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<stdint.h>
#include<inttypes.h>
typedef int32_t i32;
int cmp (const void *a, const void *b) {
i32 d = *(i32 *)a - *(i32 *)b;
return d == 0 ? 0 : d > 0 ? -1 : 1;
}
void run (void) {
i32 n, k;
scanf ("%" SCNi32 "%" SCNi32, &n, &k);
i32 len = 26;
i32*cnt = (i32 *... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235671/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235671/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,A,B,C,D;
char S[200005];
int i,j,maxDC;
scanf("%d %d %d %d %d",&N,&A,&B,&C,&D);
scanf("%s",&S);
maxDC=D;
if(C>D) maxDC=C;
for(i=A-1;i<C-1;i++)
{
if((S[i]=='#')&&(S[i+1]=='#'))
{
printf("No\n");
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235714/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235714/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int a,b,c,d,n,i,max,min,sign1=0,sign2=0;
scanf("%d %d %d %d %d",&n,&a,&b,&c,&d);
char s[n];
scanf(" %s",s);
if(c>d){
max=c;
min=d;
}else{
max=d;
min=c;
}
for(i=a-1;i<=d-1;i++){
if(s[i]=='#'&&s[i+1]=='#'){
sign1=1;
}
}
for(i=b-2;i<=min-2;i++){
if... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235758/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235758/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 count = 0;
scanf("%d", &n);
char s[100];
scanf("%s", s);
for(int i = 0; i < n; i++){
if(s[i] == 'A' && s[i+1] == 'B' && s[i+2] == 'C'){
count++;
}
}
printf("%d\n", count);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235808/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235808/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, i;
int count = 0;
char s[51];
scanf("%d", &n);
scanf("%s", &s);
//ABCが連続する数を調べる
for (i = 0; i < n; i++) {
if ((s[i] == 'A') && (s[i + 1] == 'B') && (s[i + 2] == 'C')) {
count++;//ABCが連続したらカウントする
}
}
printf("%d\n", count);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235851/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235851/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[51];
int point,n=0,strl;
scanf("%d",&strl);
scanf("%s",str);
for(point=0;point<strl;point++){
if((str[point]=='A') && (str[point+1] == 'B') && (str[point+2]== 'C')){
n++;
point+=2;
}
}
printf("%d\n",n);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235895/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235895/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,count=0;
char S[51];
scanf("%d",&N);
for(i=0;i<N;i++){
scanf("%s",&S[i]);
}
for(i=0;i<N;i++){
if(S[i+2]=='\0')break;
else if(S[i]=='A'&&S[i+1]=='B'&&S[i+2]=='C'){
count++;
}
}
printf("%d\n",count);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235945/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235945/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,count=0,N,i;
char s[51];
scanf("%d ",&N);
for(i=0;i<N;i++)
scanf("%c",&s[i]);
for(i=0;i<N-2;i++)
{
if(s[i]=='A'&&s[i+1]=='B'&&s[i+2]=='C')
count++;
}
printf("%d",count);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_235996/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_235996/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int N;
scanf("%d",&N);
char s[N];
scanf("%s",s);
int count = 0;
for(int i=0;i<N;i++){
if(s[i] == 'A'&& s[i+1] == 'B' && s[i+2] == 'C'){
count++;
i = i+2;
}
}
printf("%d",count);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236052/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236052/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int n, k, x, i, sum = 0;
scanf("%d %d %d", &n, &k, &x);
int a[n];
for(i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
i = n - 1;
while(k--) {
a[i] = x;
i--;
}
for(i = 0; i < n; i++) {
sum += a[i];
}
printf("%d\n",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23611/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23611/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 array_reset( int*, int );
int main(){
int n;
int b, f, r, v;
int i, j , k;
int house[4][3][10];
for( i = 0; i < 4; i++ ){
for( j = 0; j < 3; j++ ){
array_reset( &house[i][j][0], 10 );
}
}
scanf( "%d", &n );
for( i = 0; ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236153/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236153/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,j,k,n,b,f,r,v;
static int pe[4][3][10];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d%d",&b,&f,&r,&v);
pe[b-1][f-1][r-1]+=v;
}
for(i=0;i<4;i++){
for(j=0;j<3;j++){
for(k=0;k<10;k++)
printf(" %d",pe[i][j][k]);
printf("\n");
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236197/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236197/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@main.pe = internal unnamed... |
#include<stdio.h>
int main()
{
int a,b,c,d,e;
scanf("%d%d%d%d",&a,&b,&c,&d);
e=(3*a)/10;
a=a-c*(a/250);
if(e>a)
{
a=e;
}
e=(3*b)/10;
b=b-d*(b/250);
if(e>b)
{
b=e;
}
if(a>b)
{
printf("Misha\n");
}
else if(b>a)
{
printf("Vasya\n");
}
else
{
printf("Tie\n");
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23624/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23624/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
const char lin[] = "####################";
int main(void) {
int n, b, f, r, v, tbl[4][3][10] = {};
for(scanf("%d", &n); n--; tbl[~-b][~-f][~-r] += v) {
scanf("%d %d %d %d", &b, &f, &r, &v);
}
for(b = 0; b < 4; b++) {
for(f = 0; f < 3; f++) {
for(r = 0; r ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236283/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236283/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@lin = dso_local constant [... |
#include<stdio.h>
#include<string.h>
#define SIZE_FLOOR (10)
#define SIZE_BUILDING (3)
#define SIZE_COLLEGEOFFICE (4)
struct Floor {
int room[10];
};
struct Building {
struct Floor floor[3];
};
struct Que {
int b, f, r, v;
};
void manOfficialHouse(struct Building* offices, const struct Que* query);
void echoOff... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236326/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236326/source.c"
target datalayout = "e-m:e-p270: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.Building = type { [... |
#include <string.h>
#include <stdio.h>
int main()
{
char neww[21], old[21], A[2][1000][21];
int n, i, j, k, sum, p, found;
while (scanf("%d", &n)!=EOF)
{
p=0;
for (i=0; i<n; i++)
{
found=0;
scanf("%s%s", old, neww);
for (j=0; j<p; j++)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23637/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23637/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 count[4][3][10] = {0};
int N, i, j, k;
fscanf(stdin, "%d", &N);
for (i = 0; i < N; i++) {
int b, f, r, v;
fscanf(stdin, "%d %d %d %d", &b, &f, &r, &v);
count[b - 1][f - 1][r - 1] += v;
}
for (i = 0; i < 4; i++) {
if (i > 0) printf("####################\n");
for ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236412/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236412/source.c"
target datalayout = "e-m:e-p270: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>
int main(void){
int room[4][3][10] = {};
int n,b,f,r,v;
int i,j,k,l;
scanf("%d",&n);
for(i = 0;i < n;i++){
scanf("%d %d %d %d",&b,&f,&r,&v);
for(j = 0;j < 4;j++){
if(j == b - 1){
for(k = 0;k < 3;k++){
if(k == f - 1){
for(l = 0;l < 10;l++){
if(l == r - 1){
roo... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236456/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236456/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include<string.h>
#include<math.h>
int main()
{
long long n,k,x,y=0,sum;
scanf("%lld%lld",&n,&k);
char s[n][100];
int i;
for(i=0;i<n;i++)
{
scanf("%s",&s[i]);
}
char *sa;
for(i=n-1;i>=0;i--)
{
x=0;
sa=s[i];
if(strcmp(sa,"h... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2365/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2365/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr co... |
#include <stdio.h>
int main(void)
{
int n, a[4][3][10] = { {{0}} },b,f,r,v,i;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf(" %d %d %d %d", &b, &f, &r, &v);
a[b-1][f-1][r-1] = a[b-1][f-1][r-1] + v;
}
for (b = 0; b < 4; b++)
{
for (f = 0; f < 3; f++)
{
for (r = 0; r < 10; r++)
{
printf(" %d"... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236542/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236542/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b,f,r,v,c,i,j,k,n,a[5][4][11];
for(i=1;i<=4;i++)
for(j=1;j<=3;j++)
for(k=1;k<=10;k++)a[i][j][k]=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d %d %d %d",&b,&f,&r,&v);
a[b][f][r]=a[b][f][r]+v;
}
for(i=1;i<=4;i++){
for(j=1;j<=3;j++){
for(k=1;k... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236586/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236586/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b, f, r, v;
int i, j, k;
int tenants[4][3][10] = {{{}}};
scanf("%d", &n);
for(i = 0; i < n; ++i) {
scanf("%d %d %d %d", &b, &f, &r, &v);
tenants[b-1][f-1][r-1] += v;
}
for(i = 0; i < 4; ++i) {
for(j = 0; j < 3; ++j) {
for(k = 0; k < 10; ++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236636/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236636/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a,b,c,d;
do
{
scanf("%d %d",&a,&b);
}
while(a<250 || b>3500 || b<250 || a>3500);
do
{
scanf("%d %d",&c,&d);
}
while(c<0 || d>180 || c<0 || d>180);
int m1,m2;
m1=a - (a/250)*c;
if (3*a/10 > a - (a/2... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23668/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23668/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main(){
int a[3][10]={}, b[3][10]={}, c[3][10]={}, d[3][10]={}, n, f, r, v, w, i, j;
scanf("%d", &n);
for(i=0;i<n;i++){
scanf("%d %d %d %d", &f, &r, &v, &w);
if(f==1){
a[r-1][v-1]=a[r-1][v-1]+w;
}else if(f==2){
b[r-1][v-1]=b[r-1][v-1]+w;
}else if(f==3){
c[r-1][v-1]=c[r-1][v-1]+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236722/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236722/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4][3][10]={};
int n,b,f,r,v,i,j,k,u;
scanf("%d\n",&n);
for(i=0;i<n;i++){
scanf("%d %d %d %d\n", &b,&f,&r,&v);
a[b-1][f-1][r-1]=a[b-1][f-1][r-1]+v;
}
for(i=0;i<4;i++){
for(u=0;u<3;u++){
for(k=0;k<10;k++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236766/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236766/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 room[4][3][10];
int b,f,r,v;
int N;
for(b=0;b<4;b++)
for(f=0;f<3;f++)
for(r=0;r<10;r++)
room[b][f][r]=0;
scanf("%d",&N);
for(;N>0;N--){
scanf("%d %d %d %d",&b,&f,&r,&v);
room[b-1][f-1][r-1]+=v;
}
for(b=0;b<4;b++){
for(f=0;f<3;f++){
for(r=0;r<10;r++)
print... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236809/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236809/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(int argc, const char * argv[]) {
int n, b, f, r, v, count[4][3][10];
for(int i=0; i<4; i++){
for(int j=0; j<3; j++){
for(int k=0; k<10; k++){
count[i][j][k] = 0;
}
}
}
scanf("%d", &n);
for(int i=0; i<n; i+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236852/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236852/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i=0,j=0;
int a,b,c,d;
int building[13][11]={};
scanf("%d",&n);
while(scanf("%d %d %d %d",&a,&b,&c,&d)==4){
building[(a-1)*3+b][c]+=d;
if(i==n-1) break;
i++;
}
for(i=1;i<=12;i++){
for(j=1;j<=10;j++){
printf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236896/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236896/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 p[4][3][10] = {0};
scanf("%d", &n);
for (int i = 0; i < n; i++)
{
int b, f, r, v;
scanf("%d %d %d %d", &b, &f, &r, &v);
p[b-1][f-1][r-1] += v;
}
for (int b = 0; b < 4; b++)
{
for (int f = 0; f < 3; f++)
{... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236939/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236939/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, tou, kai, situ, num, a[4][3][10], i, j, k;
for(i=0;i<4;i++){
for(j=0;j<3;j++){
for(k=0;k<10;k++){
a[i][j][k]=0;
}
}
}
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %d %d %d",&tou,&kai,&situ,&num);
a[tou-1][kai-1][situ-1]+=num;
}
for(i=0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_236982/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_236982/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,j,k;
int b,f,x;
int v;
int r[4][3][10]={0};
scanf("%d",&n);
for(i = 0;i < n;i++){
scanf("%d %d %d %d",&b,&f,&x,&v);
r[b-1][f-1][x-1] += v;
}
for(i = 0;i < 4;i++){
for(j = 0;j < 3;j++){
for(k = 0;k < 10;k++){
printf(" %d",r[i][j][k]);
}
putchar('\n'... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237031/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237031/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b,f,r,v;
int m[4][3][10]={0};
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d %d %d",&b,&f,&r,&v);
m[b-1][3-f][r-1]+=v;
if(m[b-1][3-f][r-1]<0)m[b-1][3-f][r-1]=0;
else if(9<m[b-1][3-f][r-1])m[b-1][3-f][r-1]=9;
}
for(int i=0;i<4;i++){
for(int j=2;j>=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237075/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237075/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4][3][10]={0};
int i, j, k;
int n, b, f, r, v;
scanf("%d", &n);
for(i=0; i<n; i++){
scanf("%d %d %d %d", &b, &f, &r, &v);
a[b-1][f-1][r-1]+=v;
}
for(i=0; i<4; i++){
for(j=0; j<3; j++){
for(k=0; k<10; k++){
printf(" %d", a[i][j][k]);
}
printf("\n");
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237118/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237118/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum,k,loop,kari;
while(1){
sum = 0;
scanf("%d",&k);
if(k == 0) break;
loop = k * (k - 1)/2;
for(i = 0; i < loop; i++){
scanf("%d",&kari);
sum += kari;
}
sum /= (k-1);
printf("%d\n",sum);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237211/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237211/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 has_solution(long long k)
{
if ((1197550LL * k) % 1234567LL == 0) return 1;
if ((1197LL * k) % 1234LL == 0) return 1;
return 1197550LL * k / 1234567LL != 1197LL * k / 1234LL;
}
#define LLD "%I64d"
int main()
{
long long n;
int is = 0;
scanf(LLD, &n);
while (n >= 0)
{
if (has_soluti... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_23727/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_23727/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
#define MAX 10000
#define NIL -1
typedef struct Node{ int parent,left,right;}Node;
Node T[MAX];
int n,D[MAX],H[MAX];
void setDepth(int u,int d){
if(u==NIL) return;
D[u] = d;
setDepth(T[u].left,d+1);
setDepth(T[u].right,d+1);
}
int setHeight(int u){
int h1 = 0,h2 = 0;
if(T[u].left !=NIL... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237312/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237312/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include<stdio.h>
#define MAX 10000
#define NIL -1
struct Node{
int p, l, r;
};
struct Node T[MAX];
int n,D[MAX],H[MAX];
int getdepth(int u){
int d = 0;
while(1){
u = T[u].p;
if( u == NIL ){
break;
}
d++;
}
return d;
}
int getsibling(int u){
if( T[u].p == NIL... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237356/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237356/source.c"
target datalayout = "e-m:e-p270: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 par[100000];
int a[100000];
int c[100000];
int find(int x)
{
if (par[x] == x) return x;
return par[x] = find(par[x]);
}
void unite(int x, int y)
{
x = find(x);
y = find(y);
if (x == y) return;
par[x] = y;
}
int main()
{
int n, m, p = 0, q = 0, i;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2374/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2374/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@par = dso_local local_unnamed_... |
#include<stdio.h>
#define MAX 100000
struct Node{
int p,l,r;
};
struct Node T[MAX];
int dp[MAX],f[MAX];
void SetDe(int x,int c){
if(x==-1)return;
dp[x]=c;
SetDe(T[x].r,c+1);
SetDe(T[x].l,c+1);
}
int SetHei(int x){
int k1=0,k2=0;
if(T[x].l!=-1)k1=Se... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237442/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237442/source.c"
target datalayout = "e-m:e-p270: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 dbg(fmt,...) fprintf(stderr,fmt,__VA_ARGS__)
#define dpri(x) dbg(#x ": %d\n", x)
#define dprs(x) dbg(#x ": %s\n", x)
#include <stdio.h>
#include <string.h>
typedef long long ll;
const int MYINF = 1e9+7;
typedef int bool;
const bool true = 1;
const bool false = 0;
typedef struct node_st {
int par;
int left, r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237507/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237507/source.c"
target datalayout = "e-m:e-p270: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_st = type { i3... |
#include<stdio.h>
#include<stdlib.h>
typedef struct node{
int id;
int par, lft, rit;
}T_node;
T_node *T;
int cntdeg(T_node *);
int cntdpt(T_node *);
int gethig(T_node *, int);
int main(){
int n;
scanf("%d", &n);
T = (T_node *)malloc(sizeof(T_node) * n);
int i, id, lcl, rcl;
for(i = 0; i < n; i++)
T[i]... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237550/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237550/source.c"
target datalayout = "e-m:e-p270: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 100001
typedef struct{
int par;
int left;
int right;
}node;
node T[N];
int dep(int);
int hei(int);
int main(){
int n,i,j,a;
scanf("%d",&n);
for(i=0; i<n; i++) T[i].par = T[i].left = T[i].right =-1;
for(i=0; i<n; i++){
scanf("%d",&a);
scanf("%d %d", &T[a].rig... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237594/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237594/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.node = type { i32, ... |
#include<stdio.h>
#define MAX 10000
#define NIL -1
struct Node{
int p, l, r;
};
struct Node T[MAX];
int n;
int D[MAX], H[MAX];
int getDepth(int);
int getSibling(int);
void print(int);
int main(){
int i;
int v;
int l, r;
scanf("%d", &n);
for ( i = 0; i < n; i++ ) {
T[i].p = NIL;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237644/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237644/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.Node = type { i32, ... |
#include <stdio.h>
#define MAX 10000
#define NIL -1
struct Node{
int parent;
int left;
int right;
};
struct Node T[MAX];
int n,D[MAX],H[MAX];
void setDepth(int u,int d)
{
if(u==NIL) return;
D[u]=d;
setDepth(T[u].left,d+1);
setDepth(T[u].right,d+1);
}
int setHeight(int u)
{
int h1=0;
int h2=0;
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237688/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237688/source.c"
target datalayout = "e-m:e-p270: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
void dep(int u,int k);
int high(int u);
int sib(int u);
void print(int u);
typedef struct Node{
int p;
int l;
int r;
} node;
node T[10005];
int n,Dp[10005],H[10005];
int main(){
int i,j;
int v,root=0,left,right;
scanf("%d",&n);
//ini
for(i=0;i<n;i++) T[i].p=-1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237730/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237730/source.c"
target datalayout = "e-m:e-p270: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>
struct node{
int id;
struct node *parentNode;
struct node *firstChild;
struct node *sibling;
};
struct node* createNode(int);
struct node* searchNode(int);
int getHeight(struct node* nd);
struct node* nodes[26];
int n;
int main(){
int i,j;
int id;
int tmpId;
int left, rig... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237774/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237774/source.c"
target datalayout = "e-m:e-p270: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_struct
{
int p, l, r, s;
};
/*p: 親(parent), l: 一番左の子(left child), r:右の兄弟(right sibling)*/
//s: 兄弟(sibling)
typedef struct Node_struct Node;
Node T[MAX];
int D[MAX];
int DEG[MAX];
int H[MAX];
void print(int u)
{
int i, c;
printf("node %d: pare... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237839/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237839/source.c"
target datalayout = "e-m:e-p270: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_struct = type ... |
#include<stdio.h>
#define M 100001
typedef struct{
int p,l,r;
}Node;
Node N[M];
int depth(int i,int d){
if(N[i].p==-1) return d;
else return depth(N[i].p,++d);
}
int sib(int i){
if(N[i].p==-1) return -1;
if(N[N[i].p].r==i) return N[N[i].p].l;
if(N[N[i].p].l==i) return N[N[i].p].r;
ret... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237882/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237882/source.c"
target datalayout = "e-m:e-p270: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 pa,le,ri;
};
struct Node Tree[MAX];
int Depth[MAX],Height[MAX];
void setdepth(int,int);
int setheight(int);
int getsibling(int);
void print(int);
int main(){
int h,i,nu,l,r;
int root=0;
scanf("%d",&h);
for(i=0;i<h;i++)Tree[i].pa=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237925/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237925/source.c"
target datalayout = "e-m:e-p270: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 rei[100001];
int sub[100001];
int fin[100001];
int n;
int depth(int);
int height(int);
int main(int argc,char *argv[]){
int i,j;
scanf("%d",&n);
for(i = 0;i < n; ++i){
rei[i] = -1;
sub[i] = -1;
fin[i] = 0;
}
for(i = 0; i < n; ++i){
int ts, hi, mi;
scanf("%d %d %d",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_237969/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_237969/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.