Submission #213346
Source Code Expand
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <time.h>
#include <math.h>
#define LARGE_NUM 0xffffff
#define STACK_SIZE 0xffff
#define PUSH(e) (stack[sp++]=(e))
#define POP (stack[--sp])
#define ZERO(p,n) memset(p,0,n)
#define forto(i,l) for(int i=0,_i=(l);i<_i;i++)
#define forin(i,k,l) for(int i=(k),_i=(l);i<=_i;i++)
#define forni(i,l,k) for(int i=(l),_i=(k);i>=_i;i--)
#define swap(t,i,j) {t b=i;i=j;j=b;}
#define swapi(i,j) swap(int,i,j)
#define swapc(i,j) swap(char,i,j)
#define idtop20(i,w) ((i)%(w))
#define idtop21(i,w) ((int)((i)/(w)))
#define p2toid(x,y,w) ((y)*(w)+(x))
#define idtop30(i,w,h) idtop20(i,w)
#define idtop31(i,w,h) (idtop21(i,w)%(h))
#define idtop32(i,w,h) ((int)(idtop21(i,w)/(h)))
#define p3toid(x,y,z,w,h) ((z)*(w)*(h)+p2toid(x,y,w))
int sp, *stack;
int perm(int n, int k){ if(n < 1)return -1; if(k == 1)return n; return (n-k+1)*perm(n,k-1); }
int fact(int n){ if(n == 0)return 1; return n*fact(n-1); }
int comb(int n, int k){if(n < 1 || k < 0 || k > n)return -1;if(k == 0 || k == n)return 1;return (int)(perm(n,k)/fact(k)); }
int main(void){
stack = new int[STACK_SIZE];sp = 0;ZERO(stack,STACK_SIZE);
//start
char c;
scanf("%c", &c);
printf("%d\n", c-64);
//end
/*________________________ex:swap the input___________________*/
// int a=0,b=0;
// scanf("%d%d", &a, &b);
// printf("%d %d\n", b, a);
// delete[]stack;
/*____________________________________________________________*/
return 0;
}
Submission Info
Submission Time
2014-08-16 21:01:08+0900
Task
A - A
User
l_sigma
Language
C++ (G++ 4.6.4)
Score
100
Code Size
1510 Byte
Status
AC
Exec Time
34 ms
Memory
928 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:40:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
Judge Result
Set Name
all
Score / Max Score
100 / 100
Status
Set Name
Test Cases
all
A.txt, B.txt, C.txt, D.txt, E.txt
Case Name
Status
Exec Time
Memory
A.txt
AC
21 ms
920 KB
B.txt
AC
34 ms
928 KB
C.txt
AC
21 ms
796 KB
D.txt
AC
20 ms
804 KB
E.txt
AC
20 ms
796 KB