Why WA?
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<iostream>
#include<set>
#include<vector>
#include<queue>
#include<assert.h>
#include<algorithm>
#define INF 0x3f3f3f3f
using namespace std;
int n;
int row[5], col[5], vis[5], grid[5][5];
char s[5][5][5];
bool ...
Search found 17 matches
- Wed May 21, 2014 2:55 pm
- Forum: Volume 3 (300-399)
- Topic: 387 - A Puzzling Problem
- Replies: 6
- Views: 3565
- Fri May 09, 2014 7:22 am
- Forum: Volume 111 (11100-11199)
- Topic: 11107 - Life Forms
- Replies: 21
- Views: 17490
Re: 11107 - Life Forms
Code: Select all
delete after AC
- Thu Mar 13, 2014 11:14 am
- Forum: Volume 108 (10800-10899)
- Topic: 10801 - Lift Hopping
- Replies: 56
- Views: 37219
Re: 10801 - Lift Hopping
Code: Select all
delete after AC
- Thu Feb 27, 2014 11:17 am
- Forum: Volume 107 (10700-10799)
- Topic: 10747 - Maximum Subsequence
- Replies: 15
- Views: 12289
Re: 10747 - Maximum Subsequence
13 12
49
-23
2
15
2
18
0
30
14
11
-23
7
-48
0 0
What about this case, the output is 77 in uva toolkit, an AC program is 125, another AC program is 102, but this program's output is 0 for case 1 1 -41, my WA program is 102. I think my output is correct, two AC program is wrong. Do I misunderstand ...
49
-23
2
15
2
18
0
30
14
11
-23
7
-48
0 0
What about this case, the output is 77 in uva toolkit, an AC program is 125, another AC program is 102, but this program's output is 0 for case 1 1 -41, my WA program is 102. I think my output is correct, two AC program is wrong. Do I misunderstand ...
- Mon Feb 24, 2014 3:57 am
- Forum: Volume 104 (10400-10499)
- Topic: 10479 - The Hendrie Sequence
- Replies: 14
- Views: 8387
- Tue Oct 08, 2013 9:34 am
- Forum: Volume 102 (10200-10299)
- Topic: 10285 - Longest Run on a Snowboard
- Replies: 10
- Views: 9306
Re: 10285 - Longest Run on a Snowboard
I used DP to solve it. here are some I/O from my code:
4
Bangladesh 1 1
0
Dhaka 2 2
1 1
1 1
CTG 3 3
1 2 3
0 0 3
4 5 1
SYL 5 5
3 56 67 34 67
45 234 56 78 34
0 78 45 0 3
23 56 7 3 12
4 56 34 67 8
output:
Bangladesh: 1
Dhaka: 2
CTG: 4
SYL: 6
Your output is wrong, the answer is
Bangladesh: 1 ...
4
Bangladesh 1 1
0
Dhaka 2 2
1 1
1 1
CTG 3 3
1 2 3
0 0 3
4 5 1
SYL 5 5
3 56 67 34 67
45 234 56 78 34
0 78 45 0 3
23 56 7 3 12
4 56 34 67 8
output:
Bangladesh: 1
Dhaka: 2
CTG: 4
SYL: 6
Your output is wrong, the answer is
Bangladesh: 1 ...
- Sat Sep 28, 2013 5:58 am
- Forum: Volume 5 (500-599)
- Topic: 507 - Jill Rides Again
- Replies: 92
- Views: 44557
507 - Jill Rides Again WA
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int divide(int, int);
int state[20001], start, end, max;
int main(void)
{
int t, n, i, m;
scanf("%d", &t);
m = 0;
while(t--)
{
scanf("%d", &n);
for(i = 1; i < n; i++)
{
scanf("%d", &state );
}
max = -1;
divide(1, n ...
#include<string.h>
#include<stdlib.h>
#include<math.h>
int divide(int, int);
int state[20001], start, end, max;
int main(void)
{
int t, n, i, m;
scanf("%d", &t);
m = 0;
while(t--)
{
scanf("%d", &n);
for(i = 1; i < n; i++)
{
scanf("%d", &state );
}
max = -1;
divide(1, n ...
- Thu Sep 19, 2013 12:05 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10132 - File Fragmentation
- Replies: 24
- Views: 15846
10132 - File Fragmentation WA
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int cmp(const void *, const void *);
void compare(int, int, int);
char str[144][260];
char s[600], t[600];
int main(void)
{
int n, i, k, len, ok;
scanf("%d", &n);
getchar();
for(i = 0; i < n; i ...
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int cmp(const void *, const void *);
void compare(int, int, int);
char str[144][260];
char s[600], t[600];
int main(void)
{
int n, i, k, len, ok;
scanf("%d", &n);
getchar();
for(i = 0; i < n; i ...
- Sat Sep 14, 2013 12:11 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10887 - Concatenation of Languages
- Replies: 49
- Views: 27048
10887 - Concatenation of Languages WA
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
using namespace std;
int hash(string );
int insert(int );
string st1[1510], st2[1510];
int head[1000003], next[2250010];
string queue[2250010];
int main(void)
{
int t, a, b, i, j, k, cnt = 0;
scanf("%d ...
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
using namespace std;
int hash(string );
int insert(int );
string st1[1510], st2[1510];
int head[1000003], next[2250010];
string queue[2250010];
int main(void)
{
int t, a, b, i, j, k, cnt = 0;
scanf("%d ...
- Fri Sep 13, 2013 6:12 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10125 - Sumsets
- Replies: 50
- Views: 24046
10125 - Sumsets WA
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
int set[1010];
void Qsort(int, int);
int search(int, int, int );
int main(void) {
int t, i, j, k, a, ok;
while(scanf("%d", &t), t)
{
for(i = 0; i < t; i++)
scanf("%d", &set );
Qsort(0, t-1);
ok = 0;
for(i = 0; i ...
#include <string.h>
#include <limits.h>
#include <math.h>
int set[1010];
void Qsort(int, int);
int search(int, int, int );
int main(void) {
int t, i, j, k, a, ok;
while(scanf("%d", &t), t)
{
for(i = 0; i < t; i++)
scanf("%d", &set );
Qsort(0, t-1);
ok = 0;
for(i = 0; i ...
- Sun Aug 18, 2013 7:41 am
- Forum: Volume 103 (10300-10399)
- Topic: 10344 - 23 out of 5
- Replies: 81
- Views: 39968
Re: 10344 - 23 Out of 5
For this problem we will only consider arithmetic expressions of the following from:
notice the minus operation, it can't change according to the problem.
notice the minus operation, it can't change according to the problem.
- Mon Aug 05, 2013 11:39 am
- Forum: Volume 105 (10500-10599)
- Topic: 10557 - XYZZY
- Replies: 31
- Views: 20661
10557 - XYZZY WA
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
int visit[101];
int G[101][101];
int weight[101];
int to[101];
int dfs(int , int, int);
int bfs(int , int);
int main(void)
{
int n, i, m, k;
while(scanf("%d", &n), n != -1)
{
memset(G, 0, sizeof(G ...
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
int visit[101];
int G[101][101];
int weight[101];
int to[101];
int dfs(int , int, int);
int bfs(int , int);
int main(void)
{
int n, i, m, k;
while(scanf("%d", &n), n != -1)
{
memset(G, 0, sizeof(G ...
- Thu Aug 01, 2013 4:27 am
- Forum: Volume 105 (10500-10599)
- Topic: 10562 - Undraw the Trees
- Replies: 18
- Views: 10515
10562 - Undraw the Trees WA
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
void dfs(int, int, int);
int k;
char s[300][300];
int main(void)
{
int n;
scanf("%d", &n);
while(n--)
{
k = 0;
while(1)
{
if(gets(s[k]), s[k][0] != '\0')
{
if(s[k][0] == '#')
break;
k ...
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
void dfs(int, int, int);
int k;
char s[300][300];
int main(void)
{
int n;
scanf("%d", &n);
while(n--)
{
k = 0;
while(1)
{
if(gets(s[k]), s[k][0] != '\0')
{
if(s[k][0] == '#')
break;
k ...
- Sat Jul 27, 2013 7:41 am
- Forum: Volume 5 (500-599)
- Topic: 540 - Team Queue
- Replies: 37
- Views: 23853
Re: 540 - Team Queue always RTE
You are right.Thank you very much. When I try 1000, still RTE, in fact, I tried 1000 before. But this time I try 1010, get AC , but the problen say it is up to 1000 teams, it is confusing !brianfry713 wrote:There may be up to 1000 teams, why is your sign array size 100?
- Fri Jul 26, 2013 10:48 am
- Forum: Volume 5 (500-599)
- Topic: 540 - Team Queue
- Replies: 37
- Views: 23853
540 - Team Queue always RTE
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
typedef struct node
{
int n;
struct node* next;
}Node;
void enqueue(Node*);
int dequeue();
Node* newnode();
Node* first, *last;
Node *sign[100];
int a[1000000], p;
int main(void) {
int i, n, k, j, num, m;
char s[10 ...
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
typedef struct node
{
int n;
struct node* next;
}Node;
void enqueue(Node*);
int dequeue();
Node* newnode();
Node* first, *last;
Node *sign[100];
int a[1000000], p;
int main(void) {
int i, n, k, j, num, m;
char s[10 ...