Source_Code stringlengths 69 484k | IR_Original stringlengths 2.05k 17.9M |
|---|---|
#include <stdio.h>
#define L 100005
#define MAX 100002
typedef struct{
char name[100];
int time;
}Pro;
Pro Q[L];
int head,tail,tail,n;
void initialize(void);
Pro enq(Pro);
Pro deq(void);
int isEmpty(void);
int isFull(void);
int min(int,int);
int main(){
int el=0,b,i,q;
Pro a;
initialize();
scanf("%d%d",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253015/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253015/source.c"
target datalayout = "e-m:e-p270: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.Pro = type { [100 x... |
#include<stdio.h>
#include<stdlib.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 initialize(){
head = 0;
tail = 0;
}
int isEmpty(){
if (head == tail) return 1;
else return 0;
}
int isFull(){
if( head == (tail + 1) % (LEN+1)... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253059/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253059/source.c"
target datalayout = "e-m:e-p270: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, 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 checkmin(int a, int b){
if(a<b){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253101/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253101/source.c"
target datalayout = "e-m:e-p270: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 ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
//セグ木ここから
//*
//↓ここを変える
typedef struct atai{ll a,c;}atai;
atai xx(atai x,atai y){
atai r;
r.a=x.a+y.a;
r.c=x.c+y.c;
return r;
}
atai aid={0,0};
//↑ここを変える
int segNUM;
atai *segN,*seg;
void seguse(int n){
segN=(at... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253145/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253145/source.c"
target datalayout = "e-m:e-p270: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.atai = type { i64, ... |
#include <stdio.h>
#include <string.h>
#define LEN 100001
typedef struct process {
char name[100];
int t;
} P;
static P queue[LEN];
static int head, tail;
static P dequeue(void) {
P x = queue[head];
head = (head + 1) % LEN;
return x;
}
static void enqueue(P x) {
queue[tail] = x;
tail = (tail + 1) % LE... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253189/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253189/source.c"
target datalayout = "e-m:e-p270: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>
typedef struct {
int num;
char name[10];
}QUEUE;
int main() {
int i, time = 0, n, q, head = 0, tail;
char s[10];
QUEUE a[500000];
scanf("%d", &n);
scanf("%d", &q);
for (i = 0; i < n; i++) {
scanf("%s %d", a[i].name, &a[i].num);
}
tail = n;
i = 1;
while (head != tail) {
if (a[head].nu... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253231/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253231/source.c"
target datalayout = "e-m:e-p270: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 { i32,... |
#include<stdio.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(){
int time=0,c;
int i,q;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253282/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253282/source.c"
target datalayout = "e-m:e-p270: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 initialize(){
head = tail = 0;
}
void enqueue(P x){
Q[tail] = x;
tail = (tail + 1) % LEN;
}
P dequeue(){
int tmp;
P x = Q[head];
head = (head+1) % LEN;
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253325/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253325/source.c"
target datalayout = "e-m:e-p270: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(){
int elaps=0,c;
int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253369/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253369/source.c"
target datalayout = "e-m:e-p270: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 ... |
//set many funcs template
//Ver.20190820
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#include<time.h>
#include<assert.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253411/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253411/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@factorial = dso_local loca... |
#include <stdio.h>
int main(){
int n; scanf("%d", &n);
char s[n + 1]; scanf("%s", s);
int a = 0, b = 0;
for(int i = 0; i < n; i++){
if(s[i] == '1') a++;
else b++;
}
if(a != b) printf("1\n%s", s);
else {
printf("2\n%c ", s[0]);
for(int i = 1; i < n; i++){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25347/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25347/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 ... |
// B - ROT N
#include <stdio.h>
#include <string.h>
int main(void){
int n, i;
char s[10010];
scanf("%d%s",&n, s);
int len = strlen(s);
for(i=0; i<len; i++){
int x = s[i]-'A';
x=(x+n)%26;
putchar('A'+x);
}
puts("");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253527/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253527/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i;
char s[10001];
scanf("%d%s",&n,s);
for(i=0;s[i]!='\0';i++)
printf("%c",(s[i]-'A'+n)%26+'A');
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253570/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253570/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(void){
char input[10000];
int n,i,len;
scanf("%d",&n);
scanf("%s",input);
len = strlen(input);
for(i=0;i<len;i++){
if(input[i] + n > 'Z'){
input[i] = 'A' + (input[i] + n - 'Z') - 1;
}else
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253613/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253613/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
int n, i = 0;
scanf("%d",&n);
scanf("%*c");
char *s = malloc(1 * sizeof(char));
while (scanf("%c", &s[i]) != EOF){
++i;
s = realloc(s, (i+1) * sizeof(char));
//printf("%s\n", s);
}
s[i-1] = '\0';
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253657/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253657/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
char s[100000];
scanf("%d", &n);
scanf("%s", s);
for(i = 0;s[i] != '\0';i ++){
if(s[i] + n <= 90){
s[i] = s[i] + n;
}
else{
s[i] = s[i] + (n - 26);
}
}
printf("%s\n", s);
return 0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253707/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253707/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include <stdbool.h>
#define LL long long
#define INF 1<<31-1
#define LNF 9223372036854775807
#define PI 3.14159265358979
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define FOR(i,a,n) for(i=a;i<n;i++)
#define MOD 100... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253750/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253750/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@fac = dso_local local_unna... |
#include <stdio.h>
int main()
{
int n,m,c;
scanf("%d%d%d",&n,&m,&c);
int i;
int j;
int ans = 0;
int sum = 0;
int a[n][m];
int b[m];
i = 0;
while (i < m)
{
scanf("%d",&b[i]);
i++;
}
i = 0;
while (i < n)
{
j = 0;
while (j < m)
{
scanf("%d",&a[i][j]);
j++;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253815/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253815/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
/* define */
#define Yes(X) puts ( (X) ? "Yes" : "No")
#define YES(X) puts ( (X) ? "YES" : "NO")
#define FOR(i, a, b) for ( int i = (a); i < (b) ; i++)
#define REP(i, n) for ( int i = 0; i < (n) ; i++)
#define... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253859/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253859/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@MOD = dso_local local_unna... |
#include <stdio.h>
int main(void)
{
int i, n, m, c;
scanf("%d%d%d", &n, &m, &c);
int a[n][m], b[m];
for ( i = 0; i < m; i++)
scanf("%d", &b[i]);
for ( i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
scanf("%d", &a[i][j]);
}
}
int cnt... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253901/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253901/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
int A[20],B[20],i,judge,count=0;
scanf("%d",&N);
scanf("%d",&M);
scanf("%d",&C);
for(i=0;i<M;i++)
scanf("%d",&B[i]);
for(;N>0;N--){
judge=0;
for(i=0;i<M;i++){
scanf("%d",&A[i]);
judge+=A[i]*B[i];
}
if(judge+C>0)count++;
}
printf("... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253945/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253945/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 n,m,c,sum,count;
int b[1000],a[101][101];
count=0;
scanf("%d%d%d",&n,&m,&c);
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]));
}
}
for(int i=0;i<n;i++){
sum=0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_253996/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_253996/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 compare_int(const void *a, const void *b)
{
return *(int*)a - *(int*)b;
// return *(long long*)a - *(long long*)b;
}
// qsort(A, b, sizeof(int), compare_int);
int main()
{
int a, b, c, d, e, X, Y;
// double c;
int A[101... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254038/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254038/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b[100010],a,d=0,i,j,s;
scanf("%d %d %d",&n,&m,&c);
for(i=0;i<m;i++)scanf("%d",&b[i]);
for(i=0;i<n;i++){
for(j=s=0;j<m;j++){
scanf("%d",&a);
s+=a*b[j];
}
if(s+c>0)d++;
}
printf("%d\n",d);
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254081/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254081/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<string.h>
int main(){
int n,i,j,b=0,e=0,f=1,t,r=0;
char s[10000][11];
char *p;
scanf("%d",&n);
for(i=n;i--;){
t=0;
scanf("%s",s[i]);
b+=s[i][0]=='B';
t+=s[i][0]=='B';
for(j=2;s[i][j]!='\0';j++);
e+=s[i][j-1]=='A';
t+=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254124/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254124/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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) {
int t;
const Team ta = *(Team *)a, tb = *(Team *)b;
t = tb.solved - ta.solved;
if (t)
return t;
else {
t = ta.penalty - tb.penalty;
if (t)
return t;
else
return ta.... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254182/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254182/source.c"
target datalayout = "e-m:e-p270: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>
int main()
{
int x;
scanf("%d",&x);
for(int i=-120;i<=120;i++)
{
for(int j=-120;j<=120;j++)
{
if(i*i*i*i*i-j*j*j*j*j==x)
{
printf("%d %d\n",i,j);
return 0;
}
}
}
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254232/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254232/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long int FiveFactorical(long long int r){
return r * r * r * r * r;
}
int main(void){
long long int X,i,j,ans;
scanf("%lld",&X);
for(i = -200;i <= 200;i++){
for(j = -200;j <= 200;j++){
if(FiveFactorical(i) - FiveFactorical(j) == X){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254276/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254276/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
long long int fif(long long int n){
return n*n*n*n*n;
}
int main(void){
long long int x,i,j;
scanf("%lld",&x);
/*for(i=0;fif(i)<x;i++){
for(j=0;fif(j)+fif(i)<x;j++){
if(fif(i)+fif(j)==x){
printf("%lld -%lld\n",i,j);
return 0;
}
}
}*/
for(j=0;;j++){
f... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254319/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254319/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 m, n, g;
int a[10], b[10];
int dp[11][1001];
int i, j, k;
int sum;
while (1){
scanf("%d", &m);
if (m == 0){
break;
}
for (i = 0; i < m; i++){
scanf("%d%d", ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254362/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254362/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
#include<stdlib.h>
typedef long long int int64;
#define MAX(a,b) ((a)>(b)?(a):(b))
void run(void){
int n,k;
scanf("%d%d",&n,&k);
int *a=(int *)calloc(n,sizeof(int));
int i;
for(i=0;i<n;i++) scanf("%d",a+i);
int64 sum=0;
for(i=0;i<k;i++) sum+=a[i];
int64 free=0;
for(i=k;i<n;i++) fr... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254412/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254412/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<math.h>
int main() {
double x, h;
while (~fscanf(stdin, "%lf%lf", &x, &h), (x || h))
fprintf(stdout, "%lf\n", x*x + 2 * x*sqrt((x / 2)*(x / 2) + h*h));
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254463/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254463/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@stdin = external local_unn... |
#include<stdio.h>
#include<math.h>
#define N 1000
int main(void){
int i,num;
int x[N],h[N];
double sur;
for(i=0;;i++){
scanf("%d%d",&x[i],&h[i]);
if(x[i]==0 && h[i]==0)
break;
}
num=i;
for(i=0;i<num;i++){
sur=0.0;
sur+=x[i]*x[i];
sur+=(sqrt(h[i]*h[i]+x[i]*x[i]/4.0)*x[i])*2.0;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254513/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254513/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
typedef long long int int64;
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))
void run(void){
int h,w;
scanf("%d%d",&h,&w);
if(h%3==0 || w%3==0){
printf("0\n");
return;
}
int min=MIN(h,w);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254579/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254579/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 tate,yoko,takasa;
int irigutinum;
int i;
int hankei;
int size;
int minsize;
while(1) {
scanf("%d %d %d",&tate,&yoko,&takasa);
if(tate==0 && yoko==0 && takasa==0)break;
scanf("%d",&irigutinum);
for(i=0;i<irigutinum;i++) {
scanf("%d",&hankei);
hankei*=2;
ha... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254636/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254636/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 t,n,k,i,j;long long s;
scanf ("%d",&t);
for (i=0;i<t;i++)
{
s=1;
scanf ("%d %d",&n,&k);
for (j=0;j<k;j++)
{
s=(s*n)%1000000007;
}
printf ("%lld\n",s);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25468/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25468/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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[150];
for(int i=0;i<=100;i++)
{
a[i]=i*i;
}
int t;
scanf("%d",&t);
for(int i=0;i<t;i++)
{
int n,x,flag;
int q[110];
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",&q[i]);
for(int j=0;j<n;j+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25473/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25473/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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(){
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("%.3lf %.3lf\n",x,y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254773/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254773/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main()
{
int a, b, c, d, e, f;
double x, y;
while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) > 0) {
x = (double)(e*c-b*f)/ (a*e-d*b);
y = (double)(a*f-d*c)/ (a*e-d*b);
x == -0.0 ? x = 0.0 : x;
y == ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254816/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254816/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 fun(int a)
{
int i;
for(i=0;i*i<=a;i++)
{
if(i*i==a)
return 0;
}
return 1;
}
int main()
{
int t,n,b,i,a;
scanf("%d",&t);
while(t--)
{
int flag=0;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a);
flag=flag+fun(a);
}
if(flag)
printf("YES\n");
else
printf("NO... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25486/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 x[2][3];
double su1=0,su2=0;
int i,j,k;
char str[100];
for( ;fgets(str,sizeof(str),stdin)!=NULL; ){
sscanf(str,"%lf %lf %lf %lf %lf %lf",&x[0][0],&x[0][1],&x[0][2],&x[1][0],&x[1][1],&x[1][2]);
/*????§????????????????*/
for(k=0;k<=0;k++){
for(j=k+1;j<=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254902/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254902/source.c"
target datalayout = "e-m:e-p270: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 i,a,b,c,d,e,f,tmp;
float x,y;
while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=-1){
x = (float)(c*e-b*f)/(a*e-d*b);
y = (float)(c*d-a*f)/(b*d-a*e);
if(-0.0005<x && x<=0)x=0;
if(-0.0005<y && y<=0)y=0;
printf("%.3f %.3f\n",x,y);
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254953/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254953/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, e, f;
float x, y;
while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF){
x = (float)(c*e-f*b)/(a*e-d*b);
y = (float)(c*d-f*a)/(d*b-e*a);
if(x == -0){
x = 0;
}
if(y == -0){
y = 0;
}
printf("%.3f %.3f\n", x, y);
}
return (0);... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_254997/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_254997/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 myRound(double x){
int minusFlg = 0;
if(x < 0){
minusFlg = 1;
x = fabs(x);
}
x += 0.0005;
x *= 1000;
x = floor(x);
x /= 1000;
return x * pow(-1,minusFlg);
}
int main(void){
double a,b,c,d,e,f;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255039/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255039/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
double x,y;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){
fflush(stdin);
y=(c*d-a*f)/(b*d-a*e);
x=(c-b*y)/a;
printf("%.3f %.3f\n",x,y);
}
return 0;
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255103/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255103/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
/* prototype declaration */
void simultaneousEq();
double a, b, c, d, e, f;
double x, y;
int main(int argc, const char *argv[])
{
simultaneousEq();
return 0;
}
void simultaneousEq()
{
double det;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f) != EOF){
det = a*e-b*d;
x = (c*e-b*f)/det;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255154/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255154/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 ABS(x) (((x)<0)?(-(x)):(x))
int main(void){
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){
x=(c*e-b*f)/(double)(a*e-b*d);
y=(c*d-a*f)/(double)(b*d-a*e);
if(ABS(x)<0.0005) x=0;
if(ABS(y)<0.0005) y=0;
printf("%.3lf %.3lf\n",x,y);
}... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255204/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255204/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(int argc, char const *argv[])
{
double a, b, c, d, e, f;
double x, y;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
y = (c * d - a * f) / (b * d - e * a);
x = (c - (b * y)) / a;
printf("%.3lf %.3lf\n", x, y);
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255262/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255262/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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, e, f;
double x, y;
while (~scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f)) {
x = (b * f - c * e) / (double)(b * d - a * e);
y = (a * f - d * c) / (double)(a * e - b * d);
printf("%.3f %.3f\n", x + 0, y + 0);
}
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255305/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255305/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,b,c,d,e,f,g,x,y;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
y=(f-c*d/a)/(e-b*d/a);
x=(f-c*e/b)/(d-a*e/b);
if(-0.0004<x&&x<=0)x=0;
if(-0.0004<y&&y<=0)y=0;
printf("%.3f %.3f\n",x,y);
}
return... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255349/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255349/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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(void)
{
double a, b, c, d, e, f;
while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
double x, y;
x = (c * e - b * f) / (a * e - b * d);
y = (a * f - c * d) / (a * e - b * d);
if (x == 0) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255392/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255392/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 SIZ 1400
int m[SIZ][SIZ];
char z[9999999];
int get(){
static int input_count=0;
int r=0;
for(;'0'<=z[input_count]&&z[input_count]<='9';)r=r*10+z[input_count++]-'0';
input_count++;
return r;
}
int main(){
fread(z,1,sizeof(z),stdin);
int i,j,k,y=get(),x=get(),r,M=0;
for(j=0;j<y;j++)for(... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255442/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255442/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@get.input_count = internal... |
#include <stdio.h>
int main()
{
int N, K;
int location, i, sum;
i = 0;
sum = 0;
scanf("%d\n%d\n", &N, &K);
while (i < N)
{
scanf("%d ", &location);
if (location <= (K - location))
sum += location * 2;
else
sum += (K - location) * 2;
i++;
}
printf("%d\n", sum);
return (0);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255486/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255486/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
int abs(int i){
return i>0 ? i : i * -1;
}
int min(int i,int j ){
return i>j ? j : i;
}
int main(void){
int N;
int K;
int ans = 0;
scanf("%d", &N);
scanf("%d", &K);
int L[N];
for (int i = 0; ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255536/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255536/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
// program by Mircea Rebengiuc
// written for codeforces round 739D3
// written on 2021.08.18
int main(){
int t, n, belt, l, c;
for( scanf("%d", &t) ; t-- ; ){
scanf("%d", &n);
n--;
belt = sqrt(n);
if( n < belt * (belt + 1) ){
c = belt;
l = n - be... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25558/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25558/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include<stdio.h>
int main()
{
int N;
int K;
int x;
int i;
int distance=0;
int dista;
int distb;
scanf("%d %d",&N,&K);
for(i=0;i<N;i++)
{
scanf("%d",&x);
dista=2*x;
if((K-x)>=0)
{
distb=2*(K-x);
}else{
distb=2*(x-K);
}
if(dista>distb)
{
distance+=distb;
}else{
distance+=dista;
}
}
printf("%d\n",... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255622/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255622/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,i,cnt = 0;
scanf("%lld",&n);
long long int a[n];
for(i = 0;i < n;i++){
scanf("%lld",&a[i]);
if(a[i] % 4 < 1){
cnt += 2;
}else if(a[i] % 2 < 1){
cnt++;
}
}
if(cnt + n % 2 >= n){
printf("Yes\n");
}else{
printf("No\n");
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255666/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255666/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 b;
int n,t,i,a2=0;
scanf("%d",&n);
t=n;
if(n%2==0){
for(i=0;i<n;i++){
scanf("%lld",&b);
if(b%4==0){
t-=2;
if(t==0){
printf("Yes\n");
return 0;
}
}else if(b%2==0){
a2++;
if(a2%2==0){
t-=2;
a2=0;
}
if(t==0){
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255709/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255709/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#include <limits.h>
#include <time.h>
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int main(){
int h,n,i,j,dp[10010]={},a,b;
scanf("%d %d",&h,&n);
for(i=1; i<10010; i++){
d... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255752/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255752/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 MAX (1000000000)
int min(int a,int b){
return (a<b)?a:b;
}
int main(void){
int H,N;
int A[1111],B[1111];
int ans=0;
int HP_jittai[22222];
int *HP=&HP_jittai[11111]; //HP[i]=>iを減らすのに必要なMPの最小値
scanf("%d",&H);
scanf("%d",&N);
for(int i=0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255796/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255796/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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!
char str[200001];
scanf("%200000s",str);
for(int i = 0; str[i] != '\0'; i++){
if(str[i] == '?'){
str[i] = 'D';
}
}
printf("%s\n",str);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255846/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255846/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
/*
* main.c
*
* Created on: 2020/03/28
* Author: family
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define MAX(a,b) (a > b ? a : b)
#define MIN(a,b) (a > b ? b : a)
typedef long long int ll;
typedef unsigned long long int ull;
int sort_inc(const void *a, const void *b) ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255897/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255897/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@T = dso_local global [2000... |
#include<stdio.h>
int funct(int a) {
a++;
if(a%10!=3 && a%3!=0) return a;
a++;
if(a%10!=3 && a%3!=0) return a;
a++;
if(a%10!=3 && a%3!=0) return a;
a++;
if(a%10!=3 && a%3!=0) return a;
}
int main()
{
int t=1;
scanf("%d",&t);
while(t--) {
int k;
scanf("%d",&k);
int ans=1,c=1;
while(c<k) {... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25594/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25594/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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){
long long int N,A,B;
long long int i;
int h[100000];
long long int K;
long long int left,right;
long long int sum;
scanf("%lld %lld %lld",&N,&A,&B);
//printf("%d\n", N);
for(i=0;i<N;++i){
scanf("%d",&h[i]);
//printf("h[%lld]=%lld\n", i,h[i]);
}
left=0;... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_255983/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_255983/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[100]={0},i,j,temp,k,a,b,x,y,z,p[100]={0};
scanf("%d",&n);
scanf("%d %d",&a,&b);
scanf("%d",&k);
for(i=0;i<n;i++){
scanf("%d",&m[i]);
}
for(i=0;i<n;i++){
for(j=n;j>i;j--){
if(m[i]<m[j]){
temp=m[i];
m[i]=m[j];
m[j]=temp;
}
}
}
x=k;
z=a;
for(i=0... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256025/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256025/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,h,p_top,p_base,c_top[100],c_base,n,max=0;
scanf("%d%d%d%d",&n,&p_base,&p_top,&c_base);
for(i=0; i<n; i++){
scanf("%d",&c_top[i]);
for(j=0; j<i; j++){
if(c_top[i]>c_top[j]){
h=c_top[i];
c_top[i]=c_top[j];
c_top[j]=h;
}
}
}
for(i=0; i<n; i++){
h=c_... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256076/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256076/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void) {
int n,r,s,i,a[32];
while(scanf("%d",&n) , n != 0){
s = 0;
for(i = 0;i < n;i++){scanf("%d",&a[i]);}
printf("31\n");
r = 31;
while(1){
s%=n;
r-=(a[s]);
printf("%d\n",r);
r-=(5-a[s]);
printf("%d\n",r);
if(r == 1){break;}
s++;
}
printf("0\n");
}
re... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256119/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256119/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
int t;
scanf("%d",&t);
while(t--){
int k,c=0,i;
scanf("%d",&k);
for(i=1;i<1667;i++){
if(i%3==0 || i%10==3) continue;
c++;
if(c==k){
printf("%d\n",i);
break;
}
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25617/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25617/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_addr ... |
#include <stdio.h>
#include <math.h>
int main()
{
int t;
scanf("%d", &t);
for (int z = 0; z < t; ++z)
{
int r;
scanf("%d", &r);
int col, row;
double n1 = sqrt((double)r);
int n = (int)floor(n1);
if (n == n1)
n--;
int nsq = n * n;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25622/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25622/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 num,i,j,count[6]={0};
double height;
scanf("%d",&num);
for (i=0; i<num; i++) {
scanf("%lf",&height);
if (height<165.0) {
count[0]++;
} else if (height<170.0) {
count[1]++;
} else if (height<175.0) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256285/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256285/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
scanf("%d",&a);
if((a==3 || a== 5)||a==7)
printf("YES");
else
printf("NO");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256328/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256328/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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>
#define MAX(X, Y) (((X) > (Y))? (X) : (Y))
#define MIN(X, Y) (((X) < (Y))? (X) : (Y))
int compare_int(const void *a, const void *b){
return *(long int*)b - *(long int*)a; // 大きい順
}
int compare_int_small(const void *a, const void *b){
retur... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256371/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256371/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int
main(int argc, char *argv[])
{
int x;
scanf("%d", &x);
if(x == 3 || x == 5 || x == 7)printf("YES\n");
else printf("NO\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256421/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256421/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int x;
scanf("%d",&x);
switch(x){
case(7):
case(5):
case(3):
printf("YES");
break;
default:
printf("NO");
break;
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256465/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256465/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
int X;
scanf("%d",&X);
if((X - 3)*(X - 5)*(X - 7) == 0){
printf("YES");
}else{
printf("NO");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256508/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256508/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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==7 || n==5 || n==3){
printf("YES\n");
}else{
printf("NO");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256559/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256559/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(void){
int X;
scanf("%d",&X);
if(X==3||X==5||X==7){
printf("YES\n");
}
else{
printf("NO\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256601/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256601/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(int argc, char const *argv[])
{
int x;
scanf("%d", &x);
if (x==3 || x==5 || x==7)
{
printf("YES\n");
return 0;
}
printf("NO\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256652/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256652/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(void){
int x;
scanf("%d",&x);
if(x==7||x==5||x==3)puts("YES");
else puts("NO");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256696/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256696/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main(){
char s[1001];scanf("%s",s);
int nwes[4]={0},i=0;
while(s[i]!=0){
if(s[i]=='N')nwes[0]=1;
if(s[i]=='W')nwes[1]=1;
if(s[i]=='S')nwes[2]=1;
if(s[i]=='E')nwes[3]=1;
i++;
}
if(nwes[0]==1&&nwes[1]==1&&
nwes[2]==1&&nwes[3]==1){
puts("Yes");
return 0;
}else if(nwes[0]==1&&nwe... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256753/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256753/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
void merge_sort(int x[], int n)
{
static int y[200001] = {};
if (n <= 1) return;
merge_sort(&(x[0]), n/2);
merge_sort(&(x[n/2]), (n+1)/2);
int i, p, q;
for (i = 0, p = 0, q = n/2; i < n; i++) {
if (p >= n/2) y[i] = x[q++];
else if (q >= n) y[i] = x[p++];
else y[i] = (x[p] < x[q])? x[p+... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256797/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256797/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@merge_sort.y = internal un... |
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
long long a, i,b;
scanf("%d", &a);
int judge(long n);
for (i = 1;; ++i)
{
b = a +i ;
if (judge(b)!=0)
{
printf("%lld", i);
break;
}
}
return 0;
}
int judge(long n)
{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25684/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25684/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 deque_valtype pair
#define graph_valtype int
#define inf (int)(1e9)
typedef struct {
int v_num;
int dis;
}pair;
typedef struct edge_sub edge;
typedef struct {
int num;
int next_num;
edge *next;
int prev_num;
}vertex_sub;
struct edge_sub{
vertex_sub *v;
int w;
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256883/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256883/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.graph = type { i32,... |
#include "stdio.h"
#include "malloc.h"
#define max(X, Y) ((X) < (Y) ? (Y) : (X))
int main()
{
long long N,temp;
scanf("%lld",&N);
temp = 0;
long long *arr = malloc(N*3*sizeof(long long));
long long *dp = malloc(N*3*sizeof(long long));
while(temp<N)
{
scanf("%lld %lld %lld",arr+temp... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_256926/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_256926/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(){
int n;
scanf("%d",&n);
if(n%2){
printf("Ehab\n");
}
else {
printf("Mahmoud\n");
}
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25697/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25697/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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 max(int a, int b){
if(a < b) return b;
else return a;
}
int main(void) {
int n, dp[101000][3], a[101000][3] = {0};
scanf("%d", &n);
for (int i = 0; i < n; i++) {
for (int j = 0; j < 3; j++) scanf("%d", &a[i][j]);
}
for (int i = 0; i < n; i++) {
for ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257011/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257011/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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 max_int(int a,int b){
if (a>b) {return a;}
return b;
}
int main(int argc, char const *argv[]) {
int N;
scanf("%d", &N);
int A[N],B[N],C[N];
int Am[N],Bm[N],Cm[N];
for (size_t i = 0; i < N; i++) {
scanf("%d%d%d",&A[i],&B[i],&C[i]);
}
Am[0]=A[0];Bm[0]=B[0];Cm[0]=C[0];
for ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257055/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257055/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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<n;i++)
int test(int i,int a,int b,int c,int d){
int op[3],A[3]={b,c,d},ans=7;
op[0]=i/4;op[1]=(i%4)/2;op[2]=i%2;
ans-=a;
rep(j,3){
op[j]*=2;
if(op[j])ans-=A[j];
else ans+=A[j];
}
if(ans==0){
char s=45-op[0],t=45-op[1],u=45-op[2];
printf("%d%c%d%c%d%c%d=... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257099/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257099/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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[4],n=0,sum=0,i,j;
while(n<4)
{
num[n++]=getchar()-'0';
}
for(i=0;i<8;i++)
{
sum=num[0];
for(j=0;j<3;j++)
{
if(((i>>j)&1)==1) sum+=num[j+1];
else sum-=num[j+1];
}
if(sum==7)
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257141/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257141/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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;
char e, f, g, h;
scanf("%c%c%c%c", &e, &f, &g, &h);
a = (int)(e-'0');
b = (int)(f-'0');
c = (int)(g-'0');
d = (int)(h-'0');
if(a+b+c+d==7) {
printf("%d+%d+%d+%d=7",a,b,c,d);
} else if(a+b+c-d==7) {
printf("%d+%d+%d-%d=7",a,b,c,d);
} else if(a+b-c+d==7) {
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257185/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257185/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
int main(int argc, char const *argv[]){
int a[5],n[]={0,0,0},i,tmp;
char s[5];
scanf("%s",s);
a[3]=s[3]-'0';
a[2]=s[2]-'0';
a[1]=s[1]-'0';
a[0]=s[0]-'0';
while(1){
tmp=a[0];
for(i=0;i<3;i++)
tmp=(n[i]==0)? tmp+a[i+1]:tmp-a[i+1];
if(tmp==7)
break;
if(n[0]==0)
n[0]=1;
else{
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257271/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257271/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
//set many funcs template
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a,int b){if(a>b){return a;}return b;}
int min(int a,int b){if(a<b){return a;}return b;}
int ... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257314/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257314/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@__const.main.s = private u... |
#include<stdio.h>
#define N 3001
int main()
{
int a,b,c,d,n,i;
scanf("%d",&n);
d=0;
b=0;
for(i=1;i<=n;i++)
{
scanf("%d",&a);
b+=a-1;
}
printf("%d",b);
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257365/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257365/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64: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,sum=0;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&a);
sum+=a-1;
}
printf("%d",sum);
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257415/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257415/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
int i;
int n,fmax=0,a[3010];
scanf("%d",&n );
for(i=0;i<n;i++){
scanf("%d",&a[i]);
fmax+=a[i]-1;
}
printf("%d\n",fmax );
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257459/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257459/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include <stdio.h>
#include <stdlib.h>
int main(void){
int n, ans=0;
scanf("%d", &n);
int a[n];
for(int i=0; i<n; i++){
scanf("%d", &a[i]);
ans += a[i];
}
printf("%d", ans-n);
}
| ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257509/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257509/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@.str = private unnamed_add... |
#include<stdio.h>
int main()
{
long long int n;
scanf("%lld",&n);
if(n%2==0)
printf("Mahmoud\n");
else
printf("Ehab\n");
return 0;
} | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_25756/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_25756/source.c"
target datalayout = "e-m:e-p270:32:32-p271: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>
int compar(const int *val1,const int *val2){
return *val1-*val2;
}
int main(void){
int map[4]={0},i,sign=0,sum=0;
for(i=0;i<4;i++)
scanf("%d",&map[i]);
qsort(map,4,sizeof(int),(int(*)(const void *,const void *))compar);
for(i=0;i<3;i++){
if(map... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257602/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257602/source.c"
target datalayout = "e-m:e-p270:32:32-p271:32: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 1622 Go around the Labyrinth
// 2018.2.13 bal4u
#include <stdio.h>
#include <string.h>
typedef struct { char r, c; } Q;
Q q[2000]; int top;
int h, w;
char map[53][53];
int mv4[4][2] = {{-1,0},{0,1},{1,0},{0,-1}};
int mv9[9][2] = {{-1,-1},{-1,0},{-1,1},{0,-1},{0,0},{0,1},{-1,1},{-1,0},{1,1}};
char mk[53][53];
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257653/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257653/source.c"
target datalayout = "e-m:e-p270: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 { i8, i8 }... |
#include <stdio.h>
#include <stdlib.h>
typedef struct pair{
int x,y;
}point;
point data[100000];
int compare_int(const void *b,const void *a){
return (*(point*)a).y < (*(point*)b).y;
}
int main(void){
int N,M;
scanf("%d%d",&N,&M);
for(int i = 0;i < M;i++){
scanf("%d%d",&data[i].x,&data[i].y);
}
... | ; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_257697/source.c'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_257697/source.c"
target datalayout = "e-m:e-p270: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.pair = type { i32, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.