I also got WA but don't know why. Here is my code:
#include <iostream>
int main() {
int pos, x, num, sum, result, avg, arr[1000], rem;
double temp;
cin>>num;
while (num!=0) {
pos = 0; sum = 0; result = 0;
for (x = 0; x<num; x++) {
cin>>temp; temp*=100;
arr[pos] = (int)temp;
sum += arr ...
Search found 5 matches
- Sat Feb 28, 2004 7:21 am
- Forum: Volume 101 (10100-10199)
- Topic: 10137 - The Trip
- Replies: 159
- Views: 70332
- Sat Feb 21, 2004 5:14 pm
- Forum: Volume 7 (700-799)
- Topic: 757 - Gone Fishing
- Replies: 6
- Views: 4385
757 runtime error
Hi,
I used DP to solve this problem but I got Runtime Error. Would anyone give some test cases for me to debug? Thank you.
I used DP to solve this problem but I got Runtime Error. Would anyone give some test cases for me to debug? Thank you.
- Thu Aug 14, 2003 6:53 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65402
- Fri Aug 01, 2003 8:28 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65402
- Tue Jul 29, 2003 10:37 am
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65402
116 WA help
I have read through 13 pages about pb 116 and tried many test cases but I still can not figure out what's wrong with my code. Would anyone give me some test cases so that I can find what's wrong. Here is my source code. Thank you very much.
#include <stdio.h>
int arr[11][101], cost[11][101], path ...
#include <stdio.h>
int arr[11][101], cost[11][101], path ...