I can't find what's wrong with this code. Getting repeatedly WA. Please Help someone...
#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<string>
using namespace std;
struct Point{
long long x;
long long y;
}pnt;
class Comparator
{
public:
bool operator()(Point ...
Search found 19 matches
- Sun Jun 28, 2015 6:17 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11800 - Determine the Shape
- Replies: 47
- Views: 21876
- Fri Mar 06, 2015 7:17 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10044 - Erdos Numbers
- Replies: 102
- Views: 55231
Re: 10044 - Erdos Numbers, WA. Please help...
#include<iostream>
#include<cstdio>
#include<map>
#include<string>
#include<vector>
#include<queue>
#define sz 10005
#define inf 999999
using namespace std;
int main()
{
string str, S;
bool flag, vs[sz];
long f, id, ind, ln, P, N, T, erdos[sz];
scanf("%d", &T);
for(long i=1;i<=T;i ...
#include<cstdio>
#include<map>
#include<string>
#include<vector>
#include<queue>
#define sz 10005
#define inf 999999
using namespace std;
int main()
{
string str, S;
bool flag, vs[sz];
long f, id, ind, ln, P, N, T, erdos[sz];
scanf("%d", &T);
for(long i=1;i<=T;i ...
- Sun Mar 01, 2015 7:41 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11094 - Continents
- Replies: 43
- Views: 28208
Re: 11094 - Continents, WA??? Pls Help... :(
Code: Select all
Accepted... :)
- Sat Feb 21, 2015 8:04 pm
- Forum: Volume 120 (12000-12099)
- Topic: 12032 - The Monkey and the Oiled Bamboo
- Replies: 23
- Views: 12597
Re: 12032 - The Monkey and the Oiled Bamboo, WA, Help..
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
vector<long long>v;
long long n, nxt, fst, T, d, result, last, val;
cin>>T;
for(long long i=1;i<=T;i++)
{
cin>>n;
fst = 0;
for(long long j=1;j<=n;j++)
{
cin>>nxt;
d = nxt ...
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
vector<long long>v;
long long n, nxt, fst, T, d, result, last, val;
cin>>T;
for(long long i=1;i<=T;i++)
{
cin>>n;
fst = 0;
for(long long j=1;j<=n;j++)
{
cin>>nxt;
d = nxt ...
- Fri Feb 13, 2015 8:15 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11239 - Open Source
- Replies: 21
- Views: 11611
Re: 11239 - Open Source, Getting TLE, Help Pls...
#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<set>
#define sz 100
using namespace std;
struct PrDes
{
int cnt;
string name;
bool operator < (const PrDes& p)const
{
if(cnt > p.cnt)
return true;
else
if(cnt == p.cnt ...
#include<cstdio>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
#include<set>
#define sz 100
using namespace std;
struct PrDes
{
int cnt;
string name;
bool operator < (const PrDes& p)const
{
if(cnt > p.cnt)
return true;
else
if(cnt == p.cnt ...
- Sat Feb 07, 2015 11:23 am
- Forum: Volume 103 (10300-10399)
- Topic: 10354 - Avoiding Your Boss
- Replies: 47
- Views: 28413
Re: 10354 - Avoiding Your Boss, WA??
#include<iostream>
#include<cstdio>
#define sz 105
#define inf 99999
using namespace std;
long pr[sz], matrix[sz][sz];
long path(long r, long n)
{
for(long i=1;i<=n;i++)
matrix[i][r] = matrix[r][i] = inf;
if(pr[r] == r)
return r;
else
return path(pr[r], n);
}
long shortestPath(long n ...
#include<cstdio>
#define sz 105
#define inf 99999
using namespace std;
long pr[sz], matrix[sz][sz];
long path(long r, long n)
{
for(long i=1;i<=n;i++)
matrix[i][r] = matrix[r][i] = inf;
if(pr[r] == r)
return r;
else
return path(pr[r], n);
}
long shortestPath(long n ...
- Wed Feb 04, 2015 5:21 am
- Forum: Volume 110 (11000-11099)
- Topic: 11094 - Continents
- Replies: 43
- Views: 28208
Re: 11094 - Continents, RE???
Code: Select all
Removed
- Tue Feb 03, 2015 7:41 pm
- Forum: Volume 5 (500-599)
- Topic: 534 - Frogger
- Replies: 41
- Views: 23825
Re: 534 - Frogger, WA, Why???
#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#define sz 205
#define inf 9999
using namespace std;
vector<long long>myVec[sz];
vector<double>dst[sz];
double findPath(long long r, long long pr[], double st[][sz], double mn)
{
if(pr[r] == r)
{
printf("Frog Distance ...
#include<cstdio>
#include<vector>
#include<cmath>
#define sz 205
#define inf 9999
using namespace std;
vector<long long>myVec[sz];
vector<double>dst[sz];
double findPath(long long r, long long pr[], double st[][sz], double mn)
{
if(pr[r] == r)
{
printf("Frog Distance ...
- Tue Feb 03, 2015 6:55 am
- Forum: Volume 110 (11000-11099)
- Topic: 11094 - Continents
- Replies: 43
- Views: 28208
Re: 11094 - Continents
It's showing RE. But why???
- Mon Feb 02, 2015 9:42 am
- Forum: Volume 110 (11000-11099)
- Topic: 11094 - Continents
- Replies: 43
- Views: 28208
- Fri Jan 30, 2015 8:35 am
- Forum: Volume 9 (900-999)
- Topic: 908 - Re-connecting Computer Sites
- Replies: 21
- Views: 12976
Re: 908 - Re-connecting Computer Sites, What's wrong??
Code: Select all
Thnx brianfry713,
Got Accepted
- Tue Jan 27, 2015 8:27 am
- Forum: Volume 112 (11200-11299)
- Topic: 11286 - Conformity
- Replies: 19
- Views: 12803
Re: 11286 - Conformity
thnx brianfry713... 

- Sun Jan 25, 2015 7:11 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11286 - Conformity
- Replies: 19
- Views: 12803
Re: 11286 - Conformity, Getting WA, Need Help...
#include<iostream>
#include<cstdio>
#include<string>
#include<map>
using namespace std;
string sortedString(string ch)
{
int len = ch.length();
for(int i=0;i<len-1;i++)
{
for(int j=i+1;j<len;j++)
{
if(ch[i]>ch[j])
{
char t = ch[i];
ch[i] = ch[j];
ch[j] = t;
}
}
}
return ch;
}
int ...
#include<cstdio>
#include<string>
#include<map>
using namespace std;
string sortedString(string ch)
{
int len = ch.length();
for(int i=0;i<len-1;i++)
{
for(int j=i+1;j<len;j++)
{
if(ch[i]>ch[j])
{
char t = ch[i];
ch[i] = ch[j];
ch[j] = t;
}
}
}
return ch;
}
int ...
- Sat Jan 24, 2015 7:52 pm
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58124
Re: 195 - Anagram
thnx brianfry713
finally got AC...
finally got AC...

- Fri Jan 23, 2015 8:03 pm
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58124
Re: 195 - Anagram, Getting TLE, help please :(
#include<iostream>
#include<cstdio>
#include<string>
#include<map>
using namespace std;
map<string, int>myMap;
int permutation(string prefix, string ch)
{
int n = ch.length();
for(int i=0;i<n;i++)
{
char tmp = ch[0];
ch[0] = ch[i];
ch[i] = tmp;
if(n==1)
{
if(myMap[prefix+ch]==0 ...
#include<cstdio>
#include<string>
#include<map>
using namespace std;
map<string, int>myMap;
int permutation(string prefix, string ch)
{
int n = ch.length();
for(int i=0;i<n;i++)
{
char tmp = ch[0];
ch[0] = ch[i];
ch[i] = tmp;
if(n==1)
{
if(myMap[prefix+ch]==0 ...