Search found 7 matches

by alekscooper
Mon Nov 18, 2019 8:55 pm
Forum: Volume 8 (800-899)
Topic: 897 - Anagrammatic Primes
Replies: 21
Views: 19281

Re: 897 - Anagrammatic Primes

I'm gonna answer my own question: Yes, it works, I didn't get a TLE.
by alekscooper
Sun Nov 17, 2019 7:37 pm
Forum: Volume 8 (800-899)
Topic: 897 - Anagrammatic Primes
Replies: 21
Views: 19281

Re: 897 - Anagrammatic Primes

Hello everyone, could you guys please explain the following: Suppose I don't know how many annagramatic numbers there are and I want to do what the problems asks me to. Since N is less than 10,000,000, and I can input, for example, 8000000, I might need to generate 7! permuations for 1 number. I kno...
by alekscooper
Sun Mar 13, 2016 9:27 pm
Forum: Volume 4 (400-499)
Topic: 410 - Station Balance
Replies: 41
Views: 20548

Re: 410 - Station Balance

Hello guys, please help, I tested all the cases in the problem description, uDebug and this thread, however, I got WA. Here's the code: #include <stdio.h> #include <vector> #include <algorithm> #include <iostream> #include <cmath> using namespace std; typedef vector<int> chamber; int sum_chamber(con...
by alekscooper
Fri Feb 05, 2016 10:33 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 51963

Re: 195 - Anagram

Hi everyone, I wrote my solution in Java and here's what I did: 1) I worked with StringBuilders. I know that might be not the best option, but I'm a self-taught non-competitive guy who just learns how to code using UVa Judge. 2) The first thing I do is I sort my input string converted to StringBuild...
by alekscooper
Sun Jan 17, 2016 5:13 pm
Forum: Bugs and suggestions
Topic: Java code submission - can use a public Main
Replies: 0
Views: 4661

Java code submission - can use a public Main

Hello everyone,

The Java submission guidelines say:
Do not use public classes (even Main must be non public to avoid compile error). However, you can add and instance as many classes as needed.
However, I tried submitting some problems with Main being public and got AC.
by alekscooper
Sun Jan 17, 2016 5:08 pm
Forum: Bugs and suggestions
Topic: 793 - Network Connections - Poorly-worded concept
Replies: 0
Views: 2666

793 - Network Connections - Poorly-worded concept

Hello everyone, I think that the problem description should be tweaked. It says that ''two computers are interconnected if they are directly connected or if they are interconnected with the same computer". c 1 2 c 2 3 c 3 4 c 4 5 c 5 6 c 6 7 q 1 7 - true, according to the program grader However...
by alekscooper
Thu Jan 14, 2016 6:20 am
Forum: Volume 7 (700-799)
Topic: 793 - Network Connections
Replies: 102
Views: 44117

Re: 793 - Network Connections

Hello guys, I'm just going to start doing this problem after reading a piece on Union Find in Algorithms by R. Sedgewick. Unlike you all, I would like to do it in Java. Knowing that input/output might be a pain, I'd like to ask you what the multiple input problem is. I found here and there that it i...

Go to advanced search