Search found 8 matches

by double_zero
Thu Apr 02, 2015 8:47 pm
Forum: Volume 109 (10900-10999)
Topic: 10983 - Buy one, get the rest free
Replies: 15
Views: 6129

Re: 10983 - Buy one, get the rest free

I Keep Getting WA. could anybody help me by giving me a test case that breaks my code? #include <iostream> #include <unistd.h> #include <stdio.h> #include <string> #include <string.h> #include <algorithm> #include <functional> #include <vector> #include <cmath> #include <queue> #include <sstream> #d...
by double_zero
Fri Feb 06, 2015 10:37 am
Forum: Volume 114 (11400-11499)
Topic: 11419 - SAM I AM
Replies: 21
Views: 10615

Re: 11419 - SAM I AM

Hello guys, I have some problems with min vertex cover on bipartite graph.

I know that the "max cardinality bipartite matching" equals the number of vertices in "min vertex cover of graph", but how we print those vertices belong to min vertex cover???
by double_zero
Fri Jan 30, 2015 11:53 am
Forum: Volume 112 (11200-11299)
Topic: 11280 - Flying to Fredericton
Replies: 43
Views: 16593

Re: 11280 - Flying to Fredericton

Thank you brianfry713. ;)
by double_zero
Thu Jan 29, 2015 9:38 pm
Forum: Volume 112 (11200-11299)
Topic: 11280 - Flying to Fredericton
Replies: 43
Views: 16593

Re: 11280 - Flying to Fredericton

I use a simple dp.

dp[q]=min(dp[j][q-1]+cost[j]) for all j that i is a neighbor of j. (cost[j]!=INF)

(i==current city, j==previous city, q==remaining stopovers).
by double_zero
Tue Jan 27, 2015 10:34 am
Forum: Volume 112 (11200-11299)
Topic: 11280 - Flying to Fredericton
Replies: 43
Views: 16593

Re: 11280 - Flying to Fredericton

Keep Getting WA, But My Code Work's Fine With Every Test Case That's in here. Could anyone help me by giving a Test case that breaks my Code? or tell me whats Wrong With My Code? #include <iostream> #include <math.h> #include <algorithm> #include <fstream> #include <string> #include <map> #define IN...
by double_zero
Sun Dec 14, 2014 9:27 pm
Forum: Volume 115 (11500-11599)
Topic: 11517 - Exact Change
Replies: 33
Views: 9971

Re: 11517 - Exact Change

i Keep Getting WA, But My Code Work's Fine With Every Test Case That's in here and udebug random input. Could anyone help me by giving a testcase that breaks my Code? or tell me whats Wrong With My Code? #include <iostream> #include <math.h> #include <algorithm> #include <fstream> #include <function...
by double_zero
Tue Dec 09, 2014 1:16 pm
Forum: Volume 4 (400-499)
Topic: 410 - Station Balance
Replies: 41
Views: 15277

Re: 410 - Station Balance

I dont Know why I get WA, Plz Help, #include <iostream> #include <stdio.h> #include <string> #include <algorithm> #include <math.h> #include<vector> #include <fstream> #include <map> //#define cin fin #define x first #define y second #define pairii pair<int, int> #define mappi map< pairii , int> #de...
by double_zero
Sat Jun 28, 2014 12:53 pm
Forum: Volume 101 (10100-10199)
Topic: 10189 - Minesweeper
Replies: 418
Views: 67187

Re: 10189 - Minesweeper

Somebody Please Help Me, I Don't Know Why I Get Wrong Answer, #include <iostream> #include <algorithm> using namespace std; int n=1,m=1; char a[101][101], b[101][101]; char calc(int p, int q){ int c=0; if(a[p][q]=='*') return '*'; for(int i=p-1 ; i<=p+1 ; i++){ for(int j=q-1 ; j<=q+1 ; j++){ if( !((...

Go to advanced search