Got WA :( . Can anoyone help??
#include<cstdio>
#include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
using namespace std;
int main()
{
int c,i,j,k,ans,n,t,m,temp,tem2,tk,x;
vector<int> songs;
vector<vector<int> > dp;
scanf("%d",&c);
for(x=1;x<=c;x++)
{
songs.clear();
dp ...
Search found 7 matches
- Fri Jul 27, 2012 2:16 am
- Forum: Volume 4 (400-499)
- Topic: 473 - Raucous Rockers
- Replies: 16
- Views: 9686
- Thu Jun 21, 2012 8:48 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11057 - Exact Sum
- Replies: 50
- Views: 30545
Re: 11057 - Exact Sum
Thanks brianfry. U r a great helper. 

- Sat Jun 16, 2012 2:53 pm
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 44251
Re: 562 - Dividing Coins
Thanks
- Sat Jun 16, 2012 2:47 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11057 - Exact Sum
- Replies: 50
- Views: 30545
Re: 11057 - Exact Sum
why am i getting wa??
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int i,j,k,N;
long int books[10002],M,sum,price1,price2,min_diff;
while(scanf("%d\n",&N)!=EOF)
{
for(i=1;i<=N;i++) scanf("%ld",&books[i]);
scanf("%ld",&M);
price1=0;
price2=0;
min ...
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
int main()
{
int i,j,k,N;
long int books[10002],M,sum,price1,price2,min_diff;
while(scanf("%d\n",&N)!=EOF)
{
for(i=1;i<=N;i++) scanf("%ld",&books[i]);
scanf("%ld",&M);
price1=0;
price2=0;
min ...
- Fri Jun 15, 2012 12:38 am
- Forum: Volume 5 (500-599)
- Topic: 562 - Dividing coins
- Replies: 73
- Views: 44251
Re: 562 - Dividing Coins
Runtime error. Why????
Code: Select all
AC
- Mon Jun 11, 2012 6:29 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11420 - Chest of Drawers
- Replies: 11
- Views: 7059
Re: 11420 - Chest of Drawers
getting runtime error :-? . please help #include<stdio.h>
#include<math.h>
unsigned long long int secureit(int n,int s);
unsigned long long int soln_lck_fst_it(int n,int s);
unsigned long long int secure[100][100];
unsigned long long int soln_lck_fst[100][100];
int main()
{
int n,s;
unsigned ...
#include<math.h>
unsigned long long int secureit(int n,int s);
unsigned long long int soln_lck_fst_it(int n,int s);
unsigned long long int secure[100][100];
unsigned long long int soln_lck_fst[100][100];
int main()
{
int n,s;
unsigned ...
- Sat Oct 29, 2011 12:50 am
- Forum: Volume 117 (11700-11799)
- Topic: 11716 - Digital Fortress
- Replies: 39
- Views: 17593
Re: 11716 - Digital Fortress
I'm getting WA. Please help :( #include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
void main()
{
int t,i,j;
long int length,k;
double root;
char arr[10001],**p;
scanf("%d",&t);
fflush(stdin);
while(t--)
{
gets(arr);
length=strlen(arr);
root=sqrt(length);
if(floor ...
#include<string.h>
#include<math.h>
#include<stdlib.h>
void main()
{
int t,i,j;
long int length,k;
double root;
char arr[10001],**p;
scanf("%d",&t);
fflush(stdin);
while(t--)
{
gets(arr);
length=strlen(arr);
root=sqrt(length);
if(floor ...