Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
// AOJ 0504: Card Game II
// 2017.12.6 bal4u@uu
#include <stdio.h>
#include <string.h>
#define N 6
char ans[10015], *ap = ans+1;
int d[10015];
void calc(int b, int n)
{
int i, a;
for (a = 1, i = 0; a > 0 && i <= n; i++) {
d[i] += a / b, a %= b;
a *= 10;
}
}
int main()
{
int n, k, m, r, i;
while (scanf(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250808/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250808/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@ans = dso_local global [10... |
#include <stdio.h>
int main()
{
int a[200],b[200],c[200],i=0,j,k;
while(scanf("%d %d",&a[i],&b[i])!=EOF)
{
c[i] = a[i] + b[i];
i++;
if(i==200) break;
}
for(j=0; j<i; j++)
{
for(k=0; c[j]>=1; k++) c[j]/=10;
printf("%d\n",k);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250851/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250851/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int x,y,z;
int ans;
while(1){
z = scanf("%d %d", &x, &y);
if(z==EOF)break;
ans=0;
x = x + y;
while(x > 0){
x/=10;
ans++;
}
printf("%d\n", ans);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250895/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250895/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 keta(int x)
{
int i = 0;
while ( x > 0 ) {
x /= 10;
i++;
}
return i;
}
int main(void)
{
int a, b;
while ( scanf("%d %d", &a, &b) != EOF ) {
printf("%d\n", keta(a+b));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250938/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250938/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, sum, keta;
while(scanf("%d %d", &a, &b)!=EOF){
sum=a+b;
keta=1;
while((sum/=10)>0) keta++;
printf("%d\n", keta);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_250981/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_250981/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int b;
int sum;
int c = 1;
while (scanf("%d %d", &a, &b) != EOF){
sum = a + b;
for (; sum / 10 != 0; sum /= 10){
c++;
}
printf("%d\n", c);
c = 1;
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251023/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251023/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
int a,b;
char keta[16];
while(scanf("%d %d",&a,&b)!=EOF){
sprintf(keta,"%d",a+b);
printf("%d\n",strlen(keta));
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251074/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251074/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[200],b[200],c[200],n,j,i=0;
while(1)
{
if((scanf("%d %d",&a[i],&b[i]))==EOF) break;
c[i] = a[i] + b[i];
i++;
}
for(j=0;j<i;j++)
{
for(n=1;1;n++)
{
if(c[j]/10 == 0)break;
c[j]/=10;
}
printf("%d\n",n);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251117/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251117/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 a, b, n;
int count;
while(scanf("%lld%lld",&a,&b)!=-1){
n=a+b;
count=0;
while(n){
n/=10;
count++;
}
printf("%d\n", count);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251160/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251160/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, sum, i, len;
while(scanf("%d %d", &a, &b) != EOF){
sum = a + b;
for(len = 1; sum >= 10; len++){
sum /= 10;
}
printf("%d\n", len);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251210/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251210/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int b;
int keta = 1;
int sum;
while(scanf("%d %d", &a, &b) != EOF){
sum = a + b;
while(sum >= 10){
sum /= 10;
keta++;
}
printf("%d\n", keta);
keta = 1;
}
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251261/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251261/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while(scanf("%d %d",&a,&b)!=EOF){
c=a+b;
int keta=0;
while(c!=0){
c=c/10;
keta++;
}
printf("%d\n",keta);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251304/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251304/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
while (scanf("%d %d", &a, &b) != EOF) {
c = a + b;
d = 0;
while (c > 0) {
c = c / 10;
d++;
}
printf("%d\n", d);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251399/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251399/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,s;
while(scanf("%d %d",&a,&b)!=EOF){
s=a+b;
for(i=0;s!=0;i++){
s/=10;
}
printf("%d\n",i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251463/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 sum[1000],a[1000],b[1000],i,n,count[1000];
i=0;
while(scanf("%d %d",&a[i],&b[i])!=EOF){
sum[i]=a[i]+b[i];
i++;
}
for(n=0;n<i;n++){
count[n]=0;
while(sum[n]>0){
count[n]++;
sum[n]=sum[n]/10;
}
}
for(n=0;n<i;n++){
printf("%d\n",c... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251506/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251506/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, sum,d;
while(scanf("%d %d", &a, &b)!=EOF)
{
d=1;
sum=a+b;
while(sum >= 10)
{
sum /=10;
d++;
}
printf("%d\n", d);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251557/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251557/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 nDigits( int );
int main( void ) {
int i, a, b;
while ( scanf( "%d %d", &a, &b ) == 2 )
printf( "%d\n", nDigits( a + b ) );
return 0;
}
int nDigits( int x ) {
int d = 1;
while ( ( x /= 10 ) > 0 )
d++;
return d;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251607/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251607/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,k;
while(scanf("%d%d",&a,&b)!=EOF)
{
k=0;
c=a+b;
for(;c!=0;)
{
c=c/10;
k++;
}
printf("%d\n",k);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251650/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251650/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int wa;
int count = 0;
while(scanf("%d %d", &a, &b) != EOF){
wa = a + b;
count = 0;
do{
wa = wa / 10;
count++;
}while(wa != 0);
printf("%d\n", count);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251700/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251700/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 i,j,a,b;
while(scanf("%ld %ld",&a,&b)==2)
{
long sum=a+b;
i=0;
while(sum!=0)
{
sum/=10;
i++;
}
printf("%d\n",i);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251744/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251744/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int i,j,k,l;
while(scanf("%d%d",&i,&j)!=EOF)
{
k=i+j;
for(l=0;k;l++)
k/=10;
printf("%d\n",l);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251788/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251788/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,cnt;
while(scanf("%d %d",&a,&b) != EOF){
cnt=1;
for(i=10;i<=10000000;i=i*10){
if(a+b>=i){
cnt+=1;
}
else{
printf("%d\n",cnt);
break;
}
}
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251838/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251838/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
// I/O
void put_uint(int n) {
if(!n) {
putchar_unlocked('0');
return;
}
char buf[11];
int i = 0;
while(n) buf[i++] = (char)(n % 10 + '0'), n /= 10;
while(i--)putchar_unlocked(buf[i]);
}
void put_str(char *str) { while(*... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251881/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251881/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct._IO_FILE = type { i... |
#include<stdio.h>
#include<string.h>
#define LEN 1000005
typedef struct pp{ char name[100]; int t; }P;
P Q[LEN+1];
int main(){
int elaps=0,c;
int i,q,n,sum=0;
P u;
scanf("%d %d", &n, &q);
for ( i = 1; i <= n; i++){
scanf("%s", Q[i].name);
scanf("%d", &Q[i].t);
}
i=1;
sum=n;
while(1){
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_251931/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_251931/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
int main (void){
int T, i, j;
char s[101];
scanf( "%d", &T );
for( i = 0; i < T; i++ ){
scanf( "%s", s );
j = 0;
while( s[j] != '\0')
j++;
if( j%2 == 1 || s[0] == ')' || s[j-1] == '(')
printf("NO\n");
else
{
printf("YES\n");
}
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25199/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25199/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ARRAY 100000
int min(int x, int y) {
if(x < y)
return x;
else
return y;
}
typedef struct judge{
char name[10];
int t;
}P;
P Q[ARRAY+1];
int head, tail, n;
void enqueue(P x){
Q[tail] = x;
if ( tail == ARRAY ) tail = 1;
else tail++;
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252039/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252039/source.c"
target datalayout = "e-m:e-p270: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.judge = type { [10 ... |
#include<stdio.h>
#include<string.h>
#define Length 100005
typedef struct Point{
char name[100];
int t;
}Strc;
Strc L[Length];
int head,tail,n;
void enqueue(Strc x) {
L[tail] = x;
tail = (tail+1) % Length;
}
Strc dequeue() {
Strc x = L[head];
head = (head + 1) % Length;
return x;
}
int min(int m, int k)
{r... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252082/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252082/source.c"
target datalayout = "e-m:e-p270: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.Point = type { [100... |
#include<stdio.h>
#define max 100005
typedef struct process{
char name[256];
int time;
} p;
int head = 0, tail = 0, n;
p Q[max];
void enqueue(p);
p dequeue(void);
int main(){
int i, q, temp, passage = 0;
p dq;
scanf("%d%d", &n, &q);
head = 1;
tail = n + 1;
for(i = 1; i <= n; i++){
scanf("%s... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252125/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252125/source.c"
target datalayout = "e-m:e-p270: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.process = type { [2... |
#include<stdio.h>
#include<string.h>
#define LEN 100005
/* ?????????????????¨????§??????? */
typedef struct pp {
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x) {
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue() {
P x = Q[head];
head = (head + 1) % LEN;
return x;
}
int min(int ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252169/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252169/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
#include <string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN+1];
int head,tail,n;
void enqueue(P x){
Q[tail]=x;
if(tail+1==LEN){
tail=0;
}
else tail++;
}
P dequeue(){
P x;
x=Q[head];
if(head+1==LEN)head=0;
else head++;
return x;
}
int main(){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252211/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252211/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
#include <string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int head,tail,n;
void enqueue(P x){
Q[tail]=x;
tail=(tail+1)%LEN;
}
P dequeue(){
P x=Q[head];
head=(head+1)%LEN;
return x;
}
int min(int a,int b){
return a<b?a:b;
}
in... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252262/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252262/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN];
int head,tail,n;
void enqueue(P x){
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue(){
P x = Q[head];
head = (head + 1) % LEN;
return x;
}
int min(int a,int b) {return a < b ? a : b;}
int main(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252305/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252305/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN+1];
int head, tail, n;
void enqueue( P x ){
strcpy( Q[tail].name, x.name);
Q[tail].t = x.t;
tail++;
if(tail>LEN) tail = 0;
n++;
}
P dequeue(){
int ptr = head;
if(head==tail) NULL;
head++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252356/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252356/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
int main()
{
int n1,n2;int a[100001],b[100001];
scanf("%d %d",&n1,&n2);
int k,m;
scanf("%d %d",&k,&m);
int i;
for(i=0;i<n1;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n2;i++)
{
scanf("%d",&b[i]);
}
if(a[k-1]<b[n2-m])
{
prin... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2524/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2524/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
typedef struct{
char name[11];
int time;
}process;
int main(){
long long n, q, i, j, sp, ep, stime = 0;
process p[520000];
scanf("%lld%lld", &n, &q);
for(i = 0; i < n; ++i) scanf("%s%d", p[i].name, &p[i].time);
sp = 0; ep = n - 1;
while(sp <= ep){
if(p[sp].time > q){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252442/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252442/source.c"
target datalayout = "e-m:e-p270: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.process = type { [1... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#define MIN(x, y) ((x) <= (y) ? (x) : (y))
// just implement simple queue
typedef struct QueueKey {
char str[16];
int num;
} QueueKey;
typedef struct QueueDat {
QueueKey key;
struct QueueDat *next;
} QueueDat;
typedef struct Queue {
size_t... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252486/source.c"
target datalayout = "e-m:e-p270: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.QueueKey = type { [... |
#include <stdio.h>
#include <string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int head, tail,n;
void enqueue(P x){
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue(){
P x = Q[head];
head = (head + 1) % LEN;
return x;
}
int min(int a, int b){return a < b ? a ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252536/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252536/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
int main(){
int t,i,j,k,maxr[2],max,f1,f2,maxb[2],sum[1],n,m,r[101],b[101];
scanf("%d",&t);
for(i=0;i<t;i++){
scanf("%d",&n);
for(j=0;j<n;j++){
scanf("%d",&r[j]);
}
sum[1]=0;
maxr[1]=r[0];
for(j=0;j<n;j++){
sum[1]=sum[1]+r[j];
if(maxr[1]<sum[1])maxr[1]=sum[1];
}//��
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25258/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25258/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 LEN 100005
typedef struct pp{
char name[100];
int time;
}P;
P Q[LEN+1];
int head=0,tail,tk=0;
void enqueue(P x){
Q[tail]=x;
tail=(tail+1)%LEN;
}
P dequeue(){
P x=Q[head];
head=(head+1)%LEN;
return x;
}
int main(){
int n,q,i;
P u;
scanf("%d%d",&n,&... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252622/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252622/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
#include<stdbool.h>
#define MAX 100001
typedef struct {
int id, time;
} State;
State queue[MAX];
int head, tail;
void push(int id,int tm) {
queue[tail].id = id, queue[tail].time = tm;
tail = ((tail+1==MAX)?0:tail+1);
}
State pop() {
State v = queue[head];
head = ((head+1==MAX)?0:he... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252673/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252673/source.c"
target datalayout = "e-m:e-p270: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.State = type { i32,... |
#include <stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN+1];
int head=1, tail, n;
int main(void){
int i, q;
int time=0;
scanf("%d %d", &n, &q);
tail=n+1;
for ( i = 1; i <= n; i++){
scanf("%s", Q[i].name);
scanf("%d", &Q[i].t);
}
i=1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252723/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252723/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
#include <limits.h>
#define LENGTH 50005
typedef struct queue {
char name[100];
int value;
} Queue;
Queue q[LENGTH];
int front;
int tail;
Queue pop()
{
Queue tmp = q[front];
front = (front + 1) % LENGTH;
return tmp;
}
void push(Queue x)
{
q[tail] = x;
tail = (tail + 1... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252767/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252767/source.c"
target datalayout = "e-m:e-p270: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.queue = type { [100... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int cmp(const void *a,const void *b)
{
return *(int *)a - *(int *)b;
}
int main()
{
int n,k;
scanf("%d%d",&n,&k);
int i,a[1005],sum=0;
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
sum+=a[i];
}
int ans=0;
while(((double)sum/(double)n)+0.5<k)
{
ans+=1;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25281/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25281/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
struct q{
char name[10];
int t;
struct q *next;
struct q *prev;
};
typedef struct q * Q;
void enqueue(Q);
void dequeue();
void moveBack();
void printstate();
Q head;
int main(){
int i, n, qt, time = 0;
Q x;
head = malloc(sizeof(struct q))... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252853/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252853/source.c"
target datalayout = "e-m:e-p270: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.q = type { [10 x i8... |
#include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}Ret;
Ret Q_s[LEN];
int head, tail,z;
void enqueue_s(Ret x){
Q_s[tail]=x;
tail=(tail+1)%LEN;
}
Ret dequeue_s() {
Ret x=Q_s[head];
head=(head+1)%LEN;
return x;
}
int min(int c,int d){return c<d? c:d;}
in... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252897/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252897/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
int main()
{
int i,j,k,l,n,m;
int sum=0,count=0;
scanf("%d%d",&n,&k);
int a[n];
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
sum+=a[i];
}
count=n;
if(sum/n<k)
{
while((sum/count<k-1)||(((((float)(sum)/count-(sum)/count)))<0.5)&&(sum/count<k))
{
sum+=k;
count++;
// printf("count=%d\n",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25294/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25294/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN];
int head, tail, n;
void enqueue(P a){
Q[tail]=a;
tail=(tail+1)%LEN;
}
P dequeue(){
P a = Q[head];
head = (head+1)%LEN;
return a;
}
int min(int n,int m){return n < m ? n : m;}
int main(){
in... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_252983/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_252983/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
#define N 100000
typedef struct q{
char name[10];
int time;
}queue;
queue Q[N];
int head,tail,n;
void enqueue(queue x){
Q[tail] = x;
tail = (tail+1)%N;
}
queue dequeue(){
queue x = Q[head];
head = (head+1)%N;
return x;
}
int min(int a,int b){return a < b ? a : b;}
int main(){
q... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253025/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253025/source.c"
target datalayout = "e-m:e-p270: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.q = type { [10 x i8... |
#include<stdio.h>
#include<string.h>
typedef struct {
char name[10];
int time;
}task;
int main(void){
int n,q;
int time=0,k=0,end;
scanf("%d %d",&n,&q);
task a[1000000];
for(int i=0;i<n;i++){
scanf("%s %d",&a[i].name,&a[i].time);
}
end=n-1;
for(int i=0;k<n;i++){
if(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253076/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253076/source.c"
target datalayout = "e-m:e-p270: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.task = type { [10 x... |
#include <stdio.h>
#include <stdlib.h>
#define N_MAX 100000
#define NAME_LEN 10
struct q {
char name[NAME_LEN+1];
int time;
struct q *next;
};
int
main(void)
{
int i, n, qtm;
struct q *head = NULL;
struct q *tail = NULL;
int time = 0;
scanf("%d", &n);
scanf("%d", &qtm);
for (i = 0; i < n; i++) {
struct ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253119/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253119/source.c"
target datalayout = "e-m:e-p270: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.q = type { [11 x i8... |
#include<stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN];
int head, tail, n;
void enqueue(P x){
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue(){
P x = Q[head];
head = (head + 1) % LEN;
return x;
}
int min(int a,int b){return a < b ? a : b;}
int mai... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253162/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253162/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
#include<string.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
} P;
P Q[LEN];
int head, tail, n;
void enqueue(P x){
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue(){
P x = Q[head];
head = (head + 1) % LEN;
return x;
}
int min(int a, int b) { return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253205/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253205/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
int main(){
int i, n, q, total=0, remain, first = 0, tail = 0, time[100000], dis[100000];
char name[100000][10];
scanf("%d %d", &n, &q);
if(n > 0 && n <= 100000 && q >= 1 && q <= 1000){
for(i = 0; i < n; i++){
scanf("%s %d", name[i], &time[i]);
dis[i] = 1;
}
remain = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253249/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253249/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN+1];
int head, tail, n;
void enqueue(P);
P dequeue(void);
int main(){
int elaps = 0, c;
int i, q;
P u;
scanf("%d %d", &n, &q);
for ( i = 1; i <= n; i++){
scanf("%s", Q[i].name);
scanf("%d", &Q[i].t);
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253292/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253292/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include<stdio.h>
#include<stdlib.h>
#define LEN 100005
typedef struct pp{
char name[100];
int t;
}P;
P Q[LEN+1];
int head=0, tail=0, n;
void enqueue(P x){
Q[tail]=x;
if(tail+1==n){
tail=0;
}
else{
tail++;
}
}
P dequeue(){
P x;
x=Q[head];
if(head+1==n){
head=0;
}
else{
head++... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253335/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253335/source.c"
target datalayout = "e-m:e-p270: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 { [100 x ... |
#include <stdio.h>
#define len 1000001
typedef struct process {
char name[11];
int time;
} P;
P origin[len];
int head, tail;
void push(P x) {
origin[tail] = x;
tail = (tail + 1) % len;
}
P pop() {
P x = origin[head];
head = (head + 1) % len;
return x;
}
int ismin(int a, int b) {
return a < b ? a : ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253379/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253379/source.c"
target datalayout = "e-m:e-p270: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.process = type { [1... |
#include<stdio.h>
int main(void){
int n,m;
char s[55][55];
int i,j,k,c;
int row,ans=2500,count;
scanf("%d%d",&n,&m);
for(i=0;i<n;i++) scanf("%s",s[i]);
for(i=1;i<=n-2;i++){
for(j=1;i+j<=n-1;j++){
row=0;count=0;
for(k=0;k<i;k++){
for(c=0;c<m;c++){
if(s[row][c]!='W') cou... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253421/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253421/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
//#include<math.h>
#include<string.h>
int main()
{
char ch[10001];
long int n,z,i;
scanf("%ld %s", &n, &ch);
for(i=0;ch[i]!='\0';i++){
z = ((ch[i]-65)+n)%26;
printf("%c",z+65);
}
printf("\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253465/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253465/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//b.c B - ROT N
#include<stdio.h>
int main(void){
int n;
scanf("%d",&n);
char msg[100000];
scanf("%s",msg);
for(int i=0;msg[i]!='\0';++i){
int in = (msg[i] - 'A' + n)%26;
msg[i] = in + 'A';
}
printf("%s",msg);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253522/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253522/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i;
char string[10001];
scanf("%d%s",&num,&string);
for(i=0;string[i]!='\0';i++){
string[i]+=num;
if(string[i]>'Z'){
string[i]-=('Z'-'A'+1);
}
}
printf("%s",string);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253566/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253566/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main()
{
char S[10001];
int i, N;
scanf("%d", &N);
scanf("%s", S);
for(i = 0; i < strlen(S); i++)
S[i] = 'A' + ((S[i] - 'A' + N) % 26);
printf("%s\n", S);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253609/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253609/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
int main(void) {
int n;
char aa;
char a = 'A';
char s[10001];
scanf("%d", &n);
scanf("%s", &s);
int l = strlen(s);
for (int i=0; i<l; i++) {
aa = s[i] + n;
if (aa >= 91) {
aa -= 26;
}
s[i] = aa;
}
printf("%s", s);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253667/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253667/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main() {
int n;
char tmp;
char *s = malloc(sizeof(char)*10000);
scanf("%d %s", &n, s);
for (int i = 0; i < strlen(s); i++) {
tmp = s[i];
if (s[i] + n > 'Z') {
s[i] = 'A' + (tmp + n - 'Z') - 1;
}else {... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253717/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253717/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 2104: Country Road
// 2017.9.30 bal4u@uu
// 2017.11.7 retry
#include <stdio.h>
#include <string.h>
int f[1000001];
// for data input
char buf[800000], *p;
int getint()
{
int n = 0;
while (*p >= '0') n = (n<<3) + (n<<1) + (*p++ & 0xf);
return n;
}
int main()
{
int t, n, k, i, ans;
int x0, x, dx, min, max... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253760/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253760/source.c"
target datalayout = "e-m:e-p270: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 N,M,C;
scanf("%d%d", &N,&M);
scanf("%d", &C);
int b[M];
int a[M + 1][N + 1];
int i = 0;
while (i < M)
{
scanf("%d", &b[i]);
i++;
}
i = 0;
int j;
int ans[N + 1];
int count = 0;
while (i < N)
{
j = 0;
while (j < M)
{
scanf("%d", &a[i][j]);
ans[i] = 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253818/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253818/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,C;
int B[20];
int A;
int i,j;
int siki=0;
int ans=0;
scanf("%d%d%d",&N,&M,&C);
for(i=0;i<M;i++)
scanf("%d",&B[i]);
for(j=0;j<N;j++){
for(i=0;i<M;i++){
scanf("%d",&A);
siki+=A*B[i];
}
siki+=C;
if(siki>0)
ans++;
siki=0;
}
printf("%d",ans);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253861/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253861/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c,i,j,kari,kotae=0;
scanf("%d%d%d",&n,&m,&c);
int a[m],b[m];
for(i=0;i<m;i++){
scanf("%d",&b[i]);
}
for(j=0;j<n;j++){
kari=0;
for(i=0;i<m;i++){
scanf("%d",&a[i]);
kari+=a[i]*b[i];
}
if(kari+c>0){
kotae++;
}
}
printf("%d",ko... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253904/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253904/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 here!
int N,M,C,A,B[20],count=0;
scanf("%d",&N);
scanf("%d",&M);
scanf("%d",&C);
for(int i = 0; i < M; i++)
scanf("%d",&B[i]);
for(int i = 0; i < N; i++)
{
int sum = C;
for(int j = 0; j < M; j++)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253948/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253948/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,c;
int d = 0;
int h = 0;
int sum = 0;
scanf("%d %d %d", &n, &m, &c);
int b[m];
int a[n][m];
for(int i=0;i<m;i++){
scanf("%d", &b[i]);
}
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
scanf("%d", &a[i][j]);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253999/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253999/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, c;
int b[20];
int cnt = 0;
int i, j;
scanf("%d %d %d", &n, &m, &c);
for(i=0; i<m; i++)
scanf("%d", &b[i]);
for(i=0; i<n; i++){
int sum = 0;
for(j=0; j<m; j++){
int a;
scanf("%d", &a);
sum += b[j]*a;
}
if(sum+c > 0)
cnt++;
}
printf... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254040/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254040/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int i;
int a = 0, b = 0, ab = 0, ba = 0;
int kitaeri;
if (scanf("%d", &N) != 1) return 1;
for (i = 0; i < N; i++) {
char s[16];
int j;
if (scanf("%15s", s) != 1) return 1;
if (s[0] == 'B') b++;
for (j = 0; s[j] != '\0'; j++) {
if (s[j] == 'A' && s[j + 1] ==... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254084/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254084/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 check_ab(char *s, int len) {
int count = 0;
int flag = 0;
for (int i=0; i<len; i++) {
if (s[i] == 'A') flag = 1;
else if (s[i] == 'B') {
if (flag) {
count++;
flag = 0;
}
}
else... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254127/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254127/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
typedef struct {int id, solved, penalty;} Team;
int compare(const void *a, const void *b) {
const Team ta = *(Team *)a, tb = *(Team *)b;
if (ta.solved != tb.solved)
return tb.solved - ta.solved;
if (ta.penalty != tb.penalty)
return ta.penalty - tb.penalty;
return ta.id ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254185/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254185/source.c"
target datalayout = "e-m:e-p270: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.Team = type { i32, ... |
#include<stdio.h>
#include<math.h>
int main(void) {
int X,i,j,flag=0;
scanf("%d", &X);
for (i = 1; i <=330; i++) {
for (j = -330; j <= i; j++) {
if (powl(i,5) - powl(j,5) == X) {
printf("%d %d\n", i, j);
flag=1;
break;
}
}
if(flag==1) break;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254235/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254235/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define MOD 1000000007LL
//#define MOD 998244353LL
//#define MOD 1000000009LL
const long long INF = 1LL << 60;
typedef long long ll;
int main(){
ll X;
scanf("%lld",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254286/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254286/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@INF = dso_local local_unna... |
#include<stdio.h>
#include<stdlib.h>
int main()
{
int x,i,j,flag;
int a[2005];
scanf("%d",&x);
flag=0;
if(x==1){
printf("1 0");
return 0;
}
for(i=-1000;i<=1000;i++){
a[i+1000]=i*i*i*i*i;
}
for(i=0;i<2000;i++)
{
for(j=0;j<2000;j++)
{
if(a[i]-a[j]==x)
{
printf("%d %d",i-1000,j-1000);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254329/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254329/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=l;i<r;i++)
int main(){
ll n;
while(scanf("%lld",&n),n){
n*=2;
ll k=sqrt(n);
if(k*k==n)k--;
while(n%k||k%2==(n/k)%2)k--;
ll x=(n/k-(k-1))/2;
printf("%lld %lld\n",x,k);
}
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254400/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254400/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, h;
while (scanf("%d %d", &x, &h), x + h != 0){
printf("%.6f\n", x * x + x * sqrt(4 * h * h + x * x));
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254444/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254444/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 x, h;
double s;
while(1){
scanf("%d", &x);
scanf("%d", &h);
if(x==0&&h==0)
break;
s = x*x + x * sqrt(x*x + 4.0*h*h);
printf("%f\n", s);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254488/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254488/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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){
double x,h,s,work1,work2;
while(scanf("%lf%lf",&x,&h)){
if(x==0 && h==0)break;
work1=h*h+x*x/4;
work2=sqrt(work1);
printf("%f\n",2*work2*x+x*x);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254552/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254552/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,n,m,i;
int d;
while(scanf("%d %d %d",&a,&b,&c),a||b||c){
if(a<b){
if(b>c)b=c;
}
else if(a>c)a=c;
d=a*a+b*b;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&m);
if((m+m)*(m+m)>d)printf("OK\n");
else printf("NA\n");
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254596/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254596/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 he, wi, hi;
int i;
int n;
int x;
float p = 3.14;
while (1){
scanf("%d %d %d", &he, &wi, &hi);
if (he == 0 && wi == 0 && hi == 0){
break;
}
scanf("%d", &n);
for (i = 0; i < n; i++){
scanf("%d", &x);
if ((wi * wi) + (hi * hi) < (x * 2) * (x * 2)){
pr... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254660/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254660/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){
double a,b,c,d,e,f,g,h,k,n,y[1000],x[1000];
int i,j=0;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
//printf("%f%f%f",a,b,c);
g=c*d;
h=a*f;
k=g-h;
g=b*d;
h=a*e;
n=g-h;
y[j]=k/n;
if(y[j]>=-0.0004&&y[j]<=0)y[j]=0;
// if(y[j]>=0){
// y[j]=y[j]+0.0005;
// ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254710/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254710/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
double roundPoint4(double x) {
x = x * 1000;
if (x >= 0.0) {
return floor(x + 0.5)/ 1000;
} else {
return -1.0 * floor(fabs(x) + 0.5) / 1000;
}
}
int main (int ac, char **av )
{
while (feof(stdin) == 0) {
double a , b , c, d, e, f = 0;
fscanf(stdin, "%lf ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254754/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254754/source.c"
target datalayout = "e-m:e-p270: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()
{
int a,b,c,d,e,f;
double x,y;
while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF)
{
y=(double)(a*f-c*d)/(a*e-b*d);
x=(double)(c-b*y)/a;
printf("%.3lf %.3lf\n",x,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254798/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254798/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)
{
double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
double x = 0.0, y = 0.0;
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b , &c , &d , &e , &f) != EOF)
{
y = ((d * c) - (a * f)) / ((d * b) - (a * e));
x = (c - (b * y))... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254840/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254840/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
float a, b, c, d, e, f;
float x, y;
while ( scanf( "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f ) != EOF )
{
x = (float)(( c*e - f*b ) / ( e*a - b*d ));
y = (float)(( d*c - a*f ) / ( d*b - a*e ));
if ( -0.0005 <= x && x <= 0 ) x = 0;
i... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254884/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254884/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/*
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
Simultaneous Equation
*/
#include <stdio.h>
int main(void)
{
int a,b,c,d,e,f;
double x=0,y=0;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF)
{
/* ?????????
ax + by = c ...???1
dx + ey = f ...???2
???2????????????(a/d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254927/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254927/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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()
{
float a,b,c,d,e,f;
double x,y;
while(scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f)!=EOF &&(a>=-1000&&a<=1000)&&(b>=-1000&&b<=1000)&&(c>=-1000&&c<=1000)&&(d>=-1000&&d<=1000)&&(e>=-1000&&e<=1000)&&(f>=-1000&&f<=1000))
{
x=(e*c-b*f)/(e*a-b*d);
y=(d*c-a*f)/(d*b-a*e);
if... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254970/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254970/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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()
{
double a,b,c,d,e,f,x,y;
while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF)
{
y=(a*f-c*d)/(a*e-b*d);
x=(c-b*y)/a;
printf("%.3f %.3f\n",x,y);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255012/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255012/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
double i,j,a,b,c,d,e,f;
double x,y;
int main(){
/*while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
x=(c*e-f*b)/(a*e-d*b);
y=(c-a*x)/b;
printf("%.3lf %.3lf\n",x,y);
}*/
while (scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255056/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255056/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){
float a,b,c,d,e,f,x,y;
while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
y=(a*f-d*c)/(a*e-d*b);
x=(c-b*y)/a;
printf("%5.3f %5.3f\n",x,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255106/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255106/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
double calcY(int a,int b,int c,int d,int e,int f){
return (double)(c*d-a*f)/(b*d-a*e);
}
double calcX(int a,int b,int c,int d,int e,int f){
return (double)(c-b*calcY(a,b,c,d,e,f))/a;
}
int main(){
int a,b,c,d,e,f;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
printf("%.3lf %.3lf\n",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255164/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255164/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(){
float a, b, c, d, e, f;
float x, y;
int ix, iy;
while ( 6 == scanf( "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f ) ) {
y = ( a * f - c * d ) / ( a * e - b * d );
x = ( c - b * y ) / a;
ix = ( int )( x * 10000.0 );
iy = ( int )( y * 10000.0 ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255207/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255207/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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()
{
double a,b,c,d,e,f,n,m,x,y;
while((scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f))!=EOF){
y=(a*f-c*d)/(a*e-d*b);
x=c/a-b*y/a;
y=1000*y;
x=1000*x;
if(y>=0)
y=y+0.5;
else if(x>=0)
x=x+0.5;
else if(y<0)
y=y-0.5;
else if(x<0)
x=x-0.5;
y=(int)y;
x=(int)x;
y=y/1000;
x=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255258/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255258/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[])
{
double a[3], b[3];
double x = 0, y = 0;
double fa[2], fb[2];
while (scanf("%lf %lf %lf %lf %lf %lf", &a[0], &a[1], &a[2], &b[0], &b[1], &b[2]) != EOF) {
fa[0] = a[1] * b[0];
fa[1] = a[2] * b[0];
fb[0] = b[1] * a[0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255300/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255300/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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)
{
float a, b, c, d, e, f;
float aa, bb, cc, dd, ee, ff;
float x, y;
while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF){
aa = a * d; bb = b * d; cc = c * d;
dd = d * a; ee = e * a; ff = f * a;
bb -= ee; cc -= ff;
cc /= bb; y = cc;
c -= b * y;
c /= a;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255344/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255344/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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() {
float a, b, c, d, e, f;
for (;;) {
int i = scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f);
if (i != 6) break;
if (a * e - b * d == 0) {
printf("%.3f %.3f\n", 1.0, 1.0);
} else {
c = c / a;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255388/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255388/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 2021: Princess in Danger
// 2017.12.11 bal4u@uu
#include <stdio.h>
#include <string.h>
#define MAX 10000
typedef struct { int t, node; } QUE;
QUE que[MAX]; int qsize;
#define PARENT(i) ((i)>>1)
#define LEFT(i) ((i)<<1)
#define RIGHT(i) (((i)<<1)+1)
void min_heapify(int i)
{
int l, r, min;
QUE qt;
l = ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255430/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255430/source.c"
target datalayout = "e-m:e-p270: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.QUE = type { i32, i... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define rep(i,n) for(int i=0;i<(n);i++)
int cmpint(const void *a,const void *b){
return *(int *)b-*(int *)a;
}
int main(){
int n,k;
int x[100];
scanf("%d%d",&n,&k);
rep(i,n){
scanf("%d",&x[i]);
}
int cnt=0;
rep(i,n){
if((x[i])<=k-x[i]){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255474/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255474/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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.