It seems very easy, but I don't know what the bug in my program.
Who can tell me the bug or some notes?
[c]
#include <stdio.h>
#define MAXSIZE 10000
int N,Q,ar[MAXSIZE];
void quick(int left,int right){
int s,t,i,j,m;
if(left<right){
s=ar[(left+right)/2];
i=left-1; j=right+1;
while(1 ...
Search found 4 matches
- Tue Nov 04, 2003 3:29 pm
- Forum: Volume 104 (10400-10499)
- Topic: 10474 - Where is the Marble?
- Replies: 50
- Views: 28391
- Tue Nov 04, 2003 2:18 am
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 66996
- Sat Nov 01, 2003 6:26 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10324 - Zeros and Ones
- Replies: 179
- Views: 66996
- Tue Sep 23, 2003 12:09 pm
- Forum: Volume 4 (400-499)
- Topic: 465 - Overflow
- Replies: 104
- Views: 39047
[465]I got wa!
[c]
#include <stdio.h>
#include <string.h>
#define INT_MAX 2147483647
void main(void){
long double n1,n2;
char ch[4];
while(scanf("%lf",&n1)==1){
scanf("%s%lf",&ch,&n2);
if(n1>INT_MAX||n2>INT_MAX){
if(n1>INT_MAX) printf("first number too big\n");
if(n2>INT_MAX) printf("second number too ...
#include <stdio.h>
#include <string.h>
#define INT_MAX 2147483647
void main(void){
long double n1,n2;
char ch[4];
while(scanf("%lf",&n1)==1){
scanf("%s%lf",&ch,&n2);
if(n1>INT_MAX||n2>INT_MAX){
if(n1>INT_MAX) printf("first number too big\n");
if(n2>INT_MAX) printf("second number too ...