Can this problem be solved by Topological Sort?
According to the cardinal principle, we can use TS on this problem.
Search found 9 matches
- Wed Jul 12, 2006 8:33 am
- Forum: Volume 100 (10000-10099)
- Topic: 10000 - Longest Paths
- Replies: 160
- Views: 56559
- Wed Jul 12, 2006 7:41 am
- Forum: Volume 100 (10000-10099)
- Topic: 10000 - Longest Paths
- Replies: 160
- Views: 56559
10000
I solved "Longest Paths" by Topological Sort, but got TLE.
Certainly It was written the input wasn't a cyclic graph at all.
I don't think I got TLE because that.
What's wrong? Please help me.
#include <cstdio>
bool adj[101][101] = {false};
// adj[i][j] : Are I and J connected?
int indegree ...
Certainly It was written the input wasn't a cyclic graph at all.
I don't think I got TLE because that.
What's wrong? Please help me.
#include <cstdio>
bool adj[101][101] = {false};
// adj[i][j] : Are I and J connected?
int indegree ...
- Thu Nov 24, 2005 3:58 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10973 - Triangle Counting
- Replies: 31
- Views: 19050
10973 - Triangle Counting
#include <iostream>
#include <cstdio>
using namespace std;
bool adj[3001][3001] = {false};
// Graph will be transformed into adjacently matrix.
void reset(); // Reset after each test case.
int main()
{
int t, n, m, a, b, i, j, k;
cin >> t;
while(t--) {
int triangle = 0; // The number of ...
- Sat Oct 29, 2005 4:04 pm
- Forum: Off topic (General chit-chat)
- Topic: I win !!
- Replies: 361
- Views: 155571
HaHaHa
HaHaHa!
Guys, Now I'm winning!
Guys, Now I'm winning!
- Fri Oct 28, 2005 9:43 am
- Forum: Volume 3 (300-399)
- Topic: 343 - What Base Is This?
- Replies: 72
- Views: 28310
Thanks!
Finally, I got AC.
I appreciate your help.
Thanks!
I appreciate your help.
Thanks!
- Thu Oct 27, 2005 3:24 pm
- Forum: Volume 3 (300-399)
- Topic: 343 - What Base Is This?
- Replies: 72
- Views: 28310
Problem 343 - 'What base is this' I got WA. Please help me!
Code: Select all
Accepted
Code: Select all
12 5
10 A
12 34
123 456
1 2
10 2
But I got WA.
I really don't know what's wrong.
Please help me. Please!
- Sun Oct 23, 2005 8:18 am
- Forum: Off topic (General chit-chat)
- Topic: How many language do you know?
- Replies: 32
- Views: 18980
I know...
My list...
1. PHP
2. HTML
3. C++
4. English
5. Korean
1. PHP
2. HTML
3. C++
4. English
5. Korean
- Sat Oct 22, 2005 3:42 pm
- Forum: Off topic (General chit-chat)
- Topic: Which programming language are you useing more often?
- Replies: 4
- Views: 36599
Which programming language are you useing more often?
Which programming language are you useing more often?
Please Vote.
Please Vote.
- Sat Oct 22, 2005 3:14 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108745
Hmm...
Check your E-mail First.(If you checked 'The host I used to send that program' on 'You want to receive the replies from the Online Judge to : ', when you registered)
Your E-mail account maybe received the mail from Online Judge.
Just check the E-mail. Then, you will see what's the problem.
(Sorry ...
Your E-mail account maybe received the mail from Online Judge.
Just check the E-mail. Then, you will see what's the problem.
(Sorry ...