Give a score bonus if a codinGamer can solve the clash without Paste-ing .
(but the cheaters will use a macro)
then give another bonus if the gamer never loses focus on the editor.
or just print a Donkey image at the side of the clash winner if he copy-pasted everything!
Iāve just got an empty code window in CoC reverse.
Wasted precious time trying to switch to another lang and back and to write all that code that was always available before.
stuff like
import java.util.*;
like public class Solution {
public static void main(String[] args) {
Scanner s = new Scanner
etc (yes. i like java)
Seems the topic is dead. But i will try my luck anyway
Itās only my opinion and feel free to criticize me.
I think is not encouraging at all to use java language( C# or other similar languages) in clash of code shortest mode. Because it has a lot of key words and the result code length is large a.f.
Just look at the example of adding 2 numbers:
Java
import java.util.*;
class Solution {
public static void main(String args[]) {
Scanner i = new Scanner(System.in);
int A = i.nextInt();
int B = i.nextInt();
System.out.println(A+B);
}
}
Python
a,b=[int(i)for i in input().split()]
print(str(a+b))
Same logic steps but 226 chars vs 61 chars.
I suggest some improvements for that kind of competition. Now it calculates every char in the submitted code.
Maybe it will be better to count only the effective code lines?
Do not count spaces and tabs.
Just make it more fair for every language. So, opinions?
In all fairness, competing in short mode with different languages will never be fair. This has been discussed a lot of times. Unfortunately, we donāt have a perfect solution.
You can see it as an opportunity to:
learn a less verbose language
learn tricks of your language to reduce the number of characters
Please investigate scripting languages for Clash of Code, especially JavaScript. At least once (and possibly more) have I gotten 0% on test cases with JavaScript, but after I ported it to Java with identical logic and submitted, did I get 100%. And JavaScript is actually my expertise. I met others with similar issues.
Maximum value for a number in Javascript is 2^53 - 1. The maximum value for a long in Java is 2^63 - 1.
If you have to manipulate an integer above 2^53 - 1, you canāt do this in Javascript.
As i always said, this kind of puzzle should not exists in CoC. You canāt copy/paste a BigInteger library in your javascript code just for that ā¦
Nope, it was just something basic without need of libraries, etc.
IIRC, one was this clash with just string concatenation where I got 100% Java after porting from 0% JavaScript:
EIDT: My final Java:
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int s = in.nextInt();
String output = āā;
for (int i = 0; i < s; i++) {
for (int j = 0; j < s; j++) {
output += ā+ā;
}
output += ā\nā;
}
System.out.print(output);
}
JavaScript was very similar where I used var instead of int.
Hmm, thatās probably why. Then that should be on Clash of Code to fix. However, on any other problems requiring output of a single line, itās been fine most of the time too, so I donāt think thatās the case.
Also, since my original post, I havenāt encountered these issues again with JavaScript. If thatās because an actual fix has been made, then thanks a lot. However, I do still see some weird results from others.
For example, recently thereās this Reverse Mode averaging problem that I think is very trivial to deduce and solve in a short time. However, other players seem to struggle and even the 6th player that used to beat me quickly a lot on both harder and simpler problems before without issues:
JavaScript
var N = parseInt(readline());
var inputs = readline().split(ā ');
sum=0;
for (var i = 0; i < N; i++) {
sum+= parseInt(inputs[i]);
}
print(sum/N);