it happened many times...
is there sth wrong with the oj system..?
or a hacker did
Search found 4 matches
- Sat Jun 04, 2011 4:57 pm
- Forum: Bugs and suggestions
- Topic: Judge queuing again
- Replies: 2
- Views: 2206
- Sat Jun 04, 2011 7:45 am
- Forum: Volume 5 (500-599)
- Topic: 594 - One Little, Two Little, Three Little Endians
- Replies: 46
- Views: 23659
Re: 594 : about negative number
what's wrong with my code?
#include <stdio.h>
int main()
{
long n;
while (scanf("%ld",&n)!=EOF){
unsigned long tmp,ans=0;
printf ("%ld converts to ",n);
tmp = n;
ans|=(tmp<<24);
ans|=((tmp<<8)&0x00ff0000);
ans|=((tmp>>8)&0x0000ff00);
ans|=(tmp>>24);
printf ("%ld\n",ans);
}
return 0 ...
#include <stdio.h>
int main()
{
long n;
while (scanf("%ld",&n)!=EOF){
unsigned long tmp,ans=0;
printf ("%ld converts to ",n);
tmp = n;
ans|=(tmp<<24);
ans|=((tmp<<8)&0x00ff0000);
ans|=((tmp>>8)&0x0000ff00);
ans|=(tmp>>24);
printf ("%ld\n",ans);
}
return 0 ...
- Wed Feb 16, 2011 4:10 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10252 - Common Permutation
- Replies: 150
- Views: 74009
Re: 10252 - Common Permutation
oh, thanks. i got ac now..
i ignored the empty strings..
i ignored the empty strings..
- Tue Feb 15, 2011 5:37 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10252 - Common Permutation
- Replies: 150
- Views: 74009
Re: 10252 - Common Permutation
why did i get WA?
my code(ansi c):
#include <stdio.h>
#include <stdlib.h>
int charcmp(char *i,char* j)
{
if(*i>*j)return (1);
if(*j>*i)return (-1);
return 0;
}
main()
{
while (1){
char a[1500]={0},b[1500]={0};
char c;
int la=0,lb=0;
int ia=0,ib=0;
int i;
gets(a);gets(b);
if (!(a[0 ...
my code(ansi c):
#include <stdio.h>
#include <stdlib.h>
int charcmp(char *i,char* j)
{
if(*i>*j)return (1);
if(*j>*i)return (-1);
return 0;
}
main()
{
while (1){
char a[1500]={0},b[1500]={0};
char c;
int la=0,lb=0;
int ia=0,ib=0;
int i;
gets(a);gets(b);
if (!(a[0 ...