@cyrilverloop/codingame-configuration 1.28.0 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/config/easy/ASCIIAbacus/code/CGCode.cpp +19 -0
- package/config/easy/ASCIIAbacus/code/CGCode.java +18 -0
- package/config/easy/ASCIIAbacus/code/CGCode.js +8 -0
- package/config/easy/ASCIIAbacus/code/CGCode.php +10 -0
- package/config/easy/ASCIIAbacus/code/CGCode.ts +8 -0
- package/config/easy/ASCIIAbacus/config.json +68 -0
- package/config/easy/ASCIIAbacus/input/01 - 12345.6789.txt +11 -0
- package/config/easy/ASCIIAbacus/input/02 - 9987065.403321.txt +11 -0
- package/config/easy/ASCIIAbacus/input/03 - 23006.1103.txt +11 -0
- package/config/easy/ASCIIAbacus/input/04 - 10.8192453.txt +11 -0
- package/config/easy/ASCIIAbacus/input/05 - 159489.0007.txt +11 -0
- package/config/easy/ASCIIAbacus/input/06 - 482.03882048.txt +11 -0
- package/config/easy/ASCIIAbacus/input/07 - 0.0628.txt +11 -0
- package/config/easy/ASCIIAbacus/input/08 - 0.000000034.txt +11 -0
- package/config/easy/ASCIIAbacus/input/09 - 849200478.txt +11 -0
- package/config/easy/ASCIIAbacus/input/10 - 9999999999999.txt +11 -0
- package/config/easy/ASCIIAbacus/input/11 - 0.000000000001.txt +11 -0
- package/config/easy/ASCIIAbacus/input/12 - 0.txt +11 -0
- package/config/easy/ASCIIAbacus/output/01 - 12345.6789.txt +1 -0
- package/config/easy/ASCIIAbacus/output/02 - 9987065.403321.txt +1 -0
- package/config/easy/ASCIIAbacus/output/03 - 23006.1103.txt +1 -0
- package/config/easy/ASCIIAbacus/output/04 - 10.8192453.txt +1 -0
- package/config/easy/ASCIIAbacus/output/05 - 159489.0007.txt +1 -0
- package/config/easy/ASCIIAbacus/output/06 - 482.03882048.txt +1 -0
- package/config/easy/ASCIIAbacus/output/07 - 0.0628.txt +1 -0
- package/config/easy/ASCIIAbacus/output/08 - 0.000000034.txt +1 -0
- package/config/easy/ASCIIAbacus/output/09 - 849200478.txt +1 -0
- package/config/easy/ASCIIAbacus/output/10 - 9999999999999.txt +1 -0
- package/config/easy/ASCIIAbacus/output/11 - 0.000000000001.txt +1 -0
- package/config/easy/ASCIIAbacus/output/12 - 0.txt +1 -0
- package/config/easy/HagridSpeaking/code/CGCode.cpp +21 -0
- package/config/easy/HagridSpeaking/code/CGCode.java +22 -0
- package/config/easy/HagridSpeaking/code/CGCode.js +9 -0
- package/config/easy/HagridSpeaking/code/CGCode.php +11 -0
- package/config/easy/HagridSpeaking/code/CGCode.ts +9 -0
- package/config/easy/HagridSpeaking/config.json +48 -0
- package/config/easy/HagridSpeaking/input/01 - Simple sentences.txt +3 -0
- package/config/easy/HagridSpeaking/input/02 - Does Hagrid speak.txt +6 -0
- package/config/easy/HagridSpeaking/input/03 - t,f, d and g replacement.txt +8 -0
- package/config/easy/HagridSpeaking/input/04 - Word replacement.txt +2 -0
- package/config/easy/HagridSpeaking/input/05 - Do yeh forge/342/200/231 the case.txt" +3 -0
- package/config/easy/HagridSpeaking/input/06 - Compound Words.txt +2 -0
- package/config/easy/HagridSpeaking/input/07 - Edge cases.txt +11 -0
- package/config/easy/HagridSpeaking/input/08 - Very long talk.txt +12 -0
- package/config/easy/HagridSpeaking/output/01 - Simple sentences.txt +2 -0
- package/config/easy/HagridSpeaking/output/02 - Does Hagrid speak.txt +5 -0
- package/config/easy/HagridSpeaking/output/03 - t,f, d and g replacement.txt +7 -0
- package/config/easy/HagridSpeaking/output/04 - Word replacement.txt +1 -0
- package/config/easy/HagridSpeaking/output/05 - Do yeh forge/342/200/231 the case.txt" +2 -0
- package/config/easy/HagridSpeaking/output/06 - Compound Words.txt +1 -0
- package/config/easy/HagridSpeaking/output/07 - Edge cases.txt +10 -0
- package/config/easy/HagridSpeaking/output/08 - Very long talk.txt +11 -0
- package/config/easy/SignalCascade/code/CGCode.cpp +25 -0
- package/config/easy/SignalCascade/code/CGCode.java +22 -0
- package/config/easy/SignalCascade/code/CGCode.js +14 -0
- package/config/easy/SignalCascade/code/CGCode.php +12 -0
- package/config/easy/SignalCascade/code/CGCode.ts +14 -0
- package/config/easy/SignalCascade/config.json +48 -0
- package/config/easy/SignalCascade/input/01 - Example.txt +7 -0
- package/config/easy/SignalCascade/input/02 - Full Overload.txt +6 -0
- package/config/easy/SignalCascade/input/03 - Chain Reaction.txt +7 -0
- package/config/easy/SignalCascade/input/04 - Diagonal Chain.txt +7 -0
- package/config/easy/SignalCascade/input/05 - No Overload +5 -0
- package/config/easy/SignalCascade/input/06 - Large Calm Zone.txt +7 -0
- package/config/easy/SignalCascade/input/07 - Random 1.txt +10 -0
- package/config/easy/SignalCascade/input/08 - Random 2.txt +12 -0
- package/config/easy/SignalCascade/output/01 - Example.txt +5 -0
- package/config/easy/SignalCascade/output/02 - Full Overload.txt +4 -0
- package/config/easy/SignalCascade/output/03 - Chain Reaction.txt +5 -0
- package/config/easy/SignalCascade/output/04 - Diagonal Chain.txt +5 -0
- package/config/easy/SignalCascade/output/05 - No Overload +3 -0
- package/config/easy/SignalCascade/output/06 - Large Calm Zone.txt +5 -0
- package/config/easy/SignalCascade/output/07 - Random 1.txt +8 -0
- package/config/easy/SignalCascade/output/08 - Random 2.txt +10 -0
- package/config/easy/YouHaveBeenHacked/code/CGCode.cpp +29 -0
- package/config/easy/YouHaveBeenHacked/code/CGCode.java +31 -0
- package/config/easy/YouHaveBeenHacked/code/CGCode.js +15 -0
- package/config/easy/YouHaveBeenHacked/code/CGCode.php +19 -0
- package/config/easy/YouHaveBeenHacked/code/CGCode.ts +15 -0
- package/config/easy/YouHaveBeenHacked/config.json +38 -0
- package/config/easy/YouHaveBeenHacked/input/01 - Basic Scenario.txt +10 -0
- package/config/easy/YouHaveBeenHacked/input/02 - All Firewall Levels.txt +26 -0
- package/config/easy/YouHaveBeenHacked/input/03 - Accumulated Strengths - All Blocked.txt +37 -0
- package/config/easy/YouHaveBeenHacked/input/04 - Interleaved Attacks.txt +46 -0
- package/config/easy/YouHaveBeenHacked/input/05 - Complex Interleaving.txt +78 -0
- package/config/easy/YouHaveBeenHacked/input/06 - Total Disorder.txt +104 -0
- package/config/easy/YouHaveBeenHacked/output/01 - Basic Scenario.txt +2 -0
- package/config/easy/YouHaveBeenHacked/output/02 - All Firewall Levels.txt +6 -0
- package/config/easy/YouHaveBeenHacked/output/03 - Accumulated Strengths - All Blocked.txt +5 -0
- package/config/easy/YouHaveBeenHacked/output/04 - Interleaved Attacks.txt +4 -0
- package/config/easy/YouHaveBeenHacked/output/05 - Complex Interleaving.txt +6 -0
- package/config/easy/YouHaveBeenHacked/output/06 - Total Disorder.txt +8 -0
- package/config/hard/{SimonsOracle → SimonsExOracle}/config.json +4 -4
- package/config/medium/DecimationSequence/code/CGCode.cpp +22 -0
- package/config/medium/DecimationSequence/code/CGCode.java +20 -0
- package/config/medium/DecimationSequence/code/CGCode.js +12 -0
- package/config/medium/DecimationSequence/code/CGCode.php +12 -0
- package/config/medium/DecimationSequence/code/CGCode.ts +12 -0
- package/config/medium/DecimationSequence/config.json +58 -0
- package/config/medium/DecimationSequence/input/01 - 4 terms sequence, easy case.txt +2 -0
- package/config/medium/DecimationSequence/input/02 - 4 terms sequence, medium case.txt +2 -0
- package/config/medium/DecimationSequence/input/03 - 4 terms sequence, hard case.txt +2 -0
- package/config/medium/DecimationSequence/input/04 - Classical sequence, easy case.txt +2 -0
- package/config/medium/DecimationSequence/input/05 - Classical sequence, medium case.txt +2 -0
- package/config/medium/DecimationSequence/input/06 - Classical sequence, hard case.txt +2 -0
- package/config/medium/DecimationSequence/input/07 - Classical sequence, extreme case.txt +2 -0
- package/config/medium/DecimationSequence/input/08 - Random sequence, medium case.txt +2 -0
- package/config/medium/DecimationSequence/input/09 - Random sequence, hard case.txt +2 -0
- package/config/medium/DecimationSequence/input/10 - Random sequence, extreme case.txt +2 -0
- package/config/medium/DecimationSequence/output/01 - 4 terms sequence, easy case.txt +1 -0
- package/config/medium/DecimationSequence/output/02 - 4 terms sequence, medium case.txt +1 -0
- package/config/medium/DecimationSequence/output/03 - 4 terms sequence, hard case.txt +1 -0
- package/config/medium/DecimationSequence/output/04 - Classical sequence, easy case.txt +1 -0
- package/config/medium/DecimationSequence/output/05 - Classical sequence, medium case.txt +1 -0
- package/config/medium/DecimationSequence/output/06 - Classical sequence, hard case.txt +1 -0
- package/config/medium/DecimationSequence/output/07 - Classical sequence, extreme case.txt +1 -0
- package/config/medium/DecimationSequence/output/08 - Random sequence, medium case.txt +1 -0
- package/config/medium/DecimationSequence/output/09 - Random sequence, hard case.txt +1 -0
- package/config/medium/DecimationSequence/output/10 - Random sequence, extreme case.txt +1 -0
- package/config/medium/RubiksCubeStickers/code/CGCode.cpp +44 -0
- package/config/medium/RubiksCubeStickers/code/CGCode.java +43 -0
- package/config/medium/RubiksCubeStickers/code/CGCode.js +31 -0
- package/config/medium/RubiksCubeStickers/code/CGCode.php +29 -0
- package/config/medium/RubiksCubeStickers/code/CGCode.ts +31 -0
- package/config/medium/RubiksCubeStickers/config.json +48 -0
- package/config/medium/RubiksCubeStickers/input/01 - 1 center sticker.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/02 - 1 sidesticker.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/03 - 1 corner sticker.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/04 - 4 center stickers.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/05 - 4 side stickers.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/06 - 4 corner stickers.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/07 - C O D I N G.txt +12 -0
- package/config/medium/RubiksCubeStickers/input/08 - S H A K E D.txt +12 -0
- package/config/medium/RubiksCubeStickers/output/01 - 1 center sticker.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/02 - 1 sidesticker.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/03 - 1 corner sticker.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/04 - 4 center stickers.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/05 - 4 side stickers.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/06 - 4 corner stickers.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/07 - C O D I N G.txt +11 -0
- package/config/medium/RubiksCubeStickers/output/08 - S H A K E D.txt +11 -0
- package/config/medium/SimpleMakefiles/code/CGCode.cpp +34 -0
- package/config/medium/SimpleMakefiles/code/CGCode.java +31 -0
- package/config/medium/SimpleMakefiles/code/CGCode.js +20 -0
- package/config/medium/SimpleMakefiles/code/CGCode.php +22 -0
- package/config/medium/SimpleMakefiles/code/CGCode.ts +20 -0
- package/config/medium/SimpleMakefiles/config.json +83 -0
- package/config/medium/SimpleMakefiles/input/01 - Problem statement example.txt +12 -0
- package/config/medium/SimpleMakefiles/input/02 - Up-to-date check and partial rebuild.txt +13 -0
- package/config/medium/SimpleMakefiles/input/03 - Single rule with no actions.txt +6 -0
- package/config/medium/SimpleMakefiles/input/04 - Up-to-date ages.txt +14 -0
- package/config/medium/SimpleMakefiles/input/05 - Multiple goal targets.txt +16 -0
- package/config/medium/SimpleMakefiles/input/06 - No-action intermediates and unused rules.txt +19 -0
- package/config/medium/SimpleMakefiles/input/07 - Multiple targets with identical prerequisites.txt +18 -0
- package/config/medium/SimpleMakefiles/input/08 - Built-in macros and comments.txt +19 -0
- package/config/medium/SimpleMakefiles/input/09 - Same target in multiple rules.txt +23 -0
- package/config/medium/SimpleMakefiles/input/10 - Large partial rebuild.txt +25 -0
- package/config/medium/SimpleMakefiles/input/11 - Cycle detection.txt +22 -0
- package/config/medium/SimpleMakefiles/input/12 - Unreachable cycle detection.txt +22 -0
- package/config/medium/SimpleMakefiles/input/13 - All rebuild features combined.txt +40 -0
- package/config/medium/SimpleMakefiles/input/14 - Multiple action lines per rule.txt +25 -0
- package/config/medium/SimpleMakefiles/input/15 - Kitchen sink.txt +56 -0
- package/config/medium/SimpleMakefiles/output/01 - Problem statement example.txt +4 -0
- package/config/medium/SimpleMakefiles/output/02 - Up-to-date check and partial rebuild.txt +3 -0
- package/config/medium/SimpleMakefiles/output/03 - Single rule with no actions.txt +1 -0
- package/config/medium/SimpleMakefiles/output/04 - Up-to-date ages.txt +1 -0
- package/config/medium/SimpleMakefiles/output/05 - Multiple goal targets.txt +4 -0
- package/config/medium/SimpleMakefiles/output/06 - No-action intermediates and unused rules.txt +3 -0
- package/config/medium/SimpleMakefiles/output/07 - Multiple targets with identical prerequisites.txt +4 -0
- package/config/medium/SimpleMakefiles/output/08 - Built-in macros and comments.txt +6 -0
- package/config/medium/SimpleMakefiles/output/09 - Same target in multiple rules.txt +5 -0
- package/config/medium/SimpleMakefiles/output/10 - Large partial rebuild.txt +4 -0
- package/config/medium/SimpleMakefiles/output/11 - Cycle detection.txt +1 -0
- package/config/medium/SimpleMakefiles/output/12 - Unreachable cycle detection.txt +1 -0
- package/config/medium/SimpleMakefiles/output/13 - All rebuild features combined.txt +8 -0
- package/config/medium/SimpleMakefiles/output/14 - Multiple action lines per rule.txt +11 -0
- package/config/medium/SimpleMakefiles/output/15 - Kitchen sink.txt +14 -0
- package/config/medium/Squares/code/CGCode.cpp +30 -0
- package/config/medium/Squares/code/CGCode.java +27 -0
- package/config/medium/Squares/code/CGCode.js +20 -0
- package/config/medium/Squares/code/CGCode.php +15 -0
- package/config/medium/Squares/code/CGCode.ts +20 -0
- package/config/medium/Squares/config.json +38 -0
- package/config/medium/Squares/input/01 - Example.txt +10 -0
- package/config/medium/Squares/input/02 - Overlap.txt +17 -0
- package/config/medium/Squares/input/03 - Fat Squares.txt +15 -0
- package/config/medium/Squares/input/04 - Black Hole.txt +20 -0
- package/config/medium/Squares/input/05 - Venn.txt +28 -0
- package/config/medium/Squares/input/06 - Dartboard.txt +51 -0
- package/config/medium/Squares/output/01 - Example.txt +7 -0
- package/config/medium/Squares/output/02 - Overlap.txt +12 -0
- package/config/medium/Squares/output/03 - Fat Squares.txt +10 -0
- package/config/medium/Squares/output/04 - Black Hole.txt +15 -0
- package/config/medium/Squares/output/05 - Venn.txt +23 -0
- package/config/medium/Squares/output/06 - Dartboard.txt +46 -0
- package/package.json +1 -1
- /package/config/hard/{SimonsOracle → SimonsExOracle}/code/CGCode.js +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/code/CGCode.php +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/01 - Example.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/02 - Repetition.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/03 - Continuation.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/04 - Secrecy.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/05 - Saturation.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/06 - Coincidence.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/07 - Perpetuity.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/08 - Structure.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/input/09 - Genius.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/01 - Example.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/02 - Repetition.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/03 - Continuation.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/04 - Secrecy.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/05 - Saturation.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/06 - Coincidence.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/07 - Perpetuity.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/08 - Structure.txt +0 -0
- /package/config/hard/{SimonsOracle → SimonsExOracle}/output/09 - Genius.txt +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#include <iostream>
|
|
2
|
+
#include <string>
|
|
3
|
+
#include <vector>
|
|
4
|
+
#include <algorithm>
|
|
5
|
+
|
|
6
|
+
using namespace std;
|
|
7
|
+
|
|
8
|
+
int main()
|
|
9
|
+
{
|
|
10
|
+
int n_files;
|
|
11
|
+
cin >> n_files; cin.ignore();
|
|
12
|
+
for (int i = 0; i < n_files; i++) {
|
|
13
|
+
string preexisting_file;
|
|
14
|
+
int file_time;
|
|
15
|
+
cin >> preexisting_file >> file_time; cin.ignore();
|
|
16
|
+
}
|
|
17
|
+
int n_goal_targets;
|
|
18
|
+
cin >> n_goal_targets; cin.ignore();
|
|
19
|
+
for (int i = 0; i < n_goal_targets; i++) {
|
|
20
|
+
string goal_target;
|
|
21
|
+
cin >> goal_target; cin.ignore();
|
|
22
|
+
}
|
|
23
|
+
int n_lines;
|
|
24
|
+
cin >> n_lines; cin.ignore();
|
|
25
|
+
for (int i = 0; i < n_lines; i++) {
|
|
26
|
+
string makefile_line;
|
|
27
|
+
getline(cin, makefile_line);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Write an answer using cout. DON'T FORGET THE "<< endl"
|
|
31
|
+
// To debug: cerr << "Debug messages..." << endl;
|
|
32
|
+
|
|
33
|
+
cout << "[Build complete]" << endl;
|
|
34
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import java.util.*;
|
|
2
|
+
import java.io.*;
|
|
3
|
+
import java.math.*;
|
|
4
|
+
|
|
5
|
+
class Solution {
|
|
6
|
+
|
|
7
|
+
public static void main(String args[]) {
|
|
8
|
+
Scanner in = new Scanner(System.in);
|
|
9
|
+
int nFiles = in.nextInt();
|
|
10
|
+
for (int i = 0; i < nFiles; i++) {
|
|
11
|
+
String preexistingFile = in.next();
|
|
12
|
+
int fileTime = in.nextInt();
|
|
13
|
+
}
|
|
14
|
+
int nGoalTargets = in.nextInt();
|
|
15
|
+
for (int i = 0; i < nGoalTargets; i++) {
|
|
16
|
+
String goalTarget = in.next();
|
|
17
|
+
}
|
|
18
|
+
int nLines = in.nextInt();
|
|
19
|
+
if (in.hasNextLine()) {
|
|
20
|
+
in.nextLine();
|
|
21
|
+
}
|
|
22
|
+
for (int i = 0; i < nLines; i++) {
|
|
23
|
+
String makefileLine = in.nextLine();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Write an answer using System.out.println()
|
|
27
|
+
// To debug: System.err.println("Debug messages...");
|
|
28
|
+
|
|
29
|
+
System.out.println("[Build complete]");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const nFiles = parseInt(readline());
|
|
2
|
+
for (let i = 0; i < nFiles; i++) {
|
|
3
|
+
var inputs = readline().split(' ');
|
|
4
|
+
const preexistingFile = inputs[0];
|
|
5
|
+
const fileTime = parseInt(inputs[1]);
|
|
6
|
+
}
|
|
7
|
+
const nGoalTargets = parseInt(readline());
|
|
8
|
+
var inputs = readline().split(' ');
|
|
9
|
+
for (let i = 0; i < nGoalTargets; i++) {
|
|
10
|
+
const goalTarget = inputs[i];
|
|
11
|
+
}
|
|
12
|
+
const nLines = parseInt(readline());
|
|
13
|
+
for (let i = 0; i < nLines; i++) {
|
|
14
|
+
const makefileLine = readline();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Write an answer using console.log()
|
|
18
|
+
// To debug: console.error('Debug messages...');
|
|
19
|
+
|
|
20
|
+
console.log('[Build complete]');
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
fscanf(STDIN, "%d", $nFiles);
|
|
3
|
+
for ($i = 0; $i < $nFiles; $i++)
|
|
4
|
+
{
|
|
5
|
+
fscanf(STDIN, "%s %d", $preexistingFile, $fileTime);
|
|
6
|
+
}
|
|
7
|
+
fscanf(STDIN, "%d", $nGoalTargets);
|
|
8
|
+
$inputs = explode(" ", fgets(STDIN));
|
|
9
|
+
for ($i = 0; $i < $nGoalTargets; $i++)
|
|
10
|
+
{
|
|
11
|
+
$goalTarget = ($inputs[$i]);
|
|
12
|
+
}
|
|
13
|
+
fscanf(STDIN, "%d", $nLines);
|
|
14
|
+
for ($i = 0; $i < $nLines; $i++)
|
|
15
|
+
{
|
|
16
|
+
$makefileLine = stream_get_line(STDIN, 100 + 1, "\n");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Write an answer using echo(). DON'T FORGET THE TRAILING \n
|
|
20
|
+
// To debug: error_log(var_export($var, true)); (equivalent to var_dump)
|
|
21
|
+
|
|
22
|
+
echo("[Build complete]\n");
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const nFiles: number = parseInt(readline());
|
|
2
|
+
for (let i = 0; i < nFiles; i++) {
|
|
3
|
+
var inputs: string[] = readline().split(' ');
|
|
4
|
+
const preexistingFile: string = inputs[0];
|
|
5
|
+
const fileTime: number = parseInt(inputs[1]);
|
|
6
|
+
}
|
|
7
|
+
const nGoalTargets: number = parseInt(readline());
|
|
8
|
+
var inputs: string[] = readline().split(' ');
|
|
9
|
+
for (let i = 0; i < nGoalTargets; i++) {
|
|
10
|
+
const goalTarget: string = inputs[i];
|
|
11
|
+
}
|
|
12
|
+
const nLines: number = parseInt(readline());
|
|
13
|
+
for (let i = 0; i < nLines; i++) {
|
|
14
|
+
const makefileLine: string = readline();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Write an answer using console.log()
|
|
18
|
+
// To debug: console.error('Debug messages...');
|
|
19
|
+
|
|
20
|
+
console.log('[Build complete]');
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"path": "medium/SimpleMakefiles",
|
|
3
|
+
"name": "Simple Makefiles",
|
|
4
|
+
"alphanumName": "SimpleMakefiles",
|
|
5
|
+
"link": "https://www.codingame.com/ide/puzzle/simple-makefiles",
|
|
6
|
+
"tests": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Problem statement example",
|
|
9
|
+
"alphanumName": "ProblemStatementExample",
|
|
10
|
+
"file": "01 - Problem statement example.txt"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Up-to-date check and partial rebuild",
|
|
14
|
+
"alphanumName": "UptodateCheckAndPartialRebuild",
|
|
15
|
+
"file": "02 - Up-to-date check and partial rebuild.txt"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Single rule with no actions",
|
|
19
|
+
"alphanumName": "SingleRuleWithNoActions",
|
|
20
|
+
"file": "03 - Single rule with no actions.txt"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Up-to-date ages",
|
|
24
|
+
"alphanumName": "UptodateAges",
|
|
25
|
+
"file": "04 - Up-to-date ages.txt"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "Multiple goal targets",
|
|
29
|
+
"alphanumName": "MultipleGoalTargets",
|
|
30
|
+
"file": "05 - Multiple goal targets.txt"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "No-action intermediates and unused rules",
|
|
34
|
+
"alphanumName": "NoactionIntermediatesAndUnusedRules",
|
|
35
|
+
"file": "06 - No-action intermediates and unused rules.txt"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "Multiple targets with identical prerequisites",
|
|
39
|
+
"alphanumName": "MultipleTargetsWithIdenticalPrerequisites",
|
|
40
|
+
"file": "07 - Multiple targets with identical prerequisites.txt"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Built-in macros and comments",
|
|
44
|
+
"alphanumName": "BuiltinMacrosAndComments",
|
|
45
|
+
"file": "08 - Built-in macros and comments.txt"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "Same target in multiple rules",
|
|
49
|
+
"alphanumName": "SameTargetInMultipleRules",
|
|
50
|
+
"file": "09 - Same target in multiple rules.txt"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "Large partial rebuild",
|
|
54
|
+
"alphanumName": "LargePartialRebuild",
|
|
55
|
+
"file": "10 - Large partial rebuild.txt"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "Cycle detection",
|
|
59
|
+
"alphanumName": "CycleDetection",
|
|
60
|
+
"file": "11 - Cycle detection.txt"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "Unreachable cycle detection",
|
|
64
|
+
"alphanumName": "UnreachableCycleDetection",
|
|
65
|
+
"file": "12 - Unreachable cycle detection.txt"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "All rebuild features combined",
|
|
69
|
+
"alphanumName": "AllRebuildFeaturesCombined",
|
|
70
|
+
"file": "13 - All rebuild features combined.txt"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "Multiple action lines per rule",
|
|
74
|
+
"alphanumName": "MultipleActionLinesPerRule",
|
|
75
|
+
"file": "14 - Multiple action lines per rule.txt"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "Kitchen sink",
|
|
79
|
+
"alphanumName": "KitchenSink",
|
|
80
|
+
"file": "15 - Kitchen sink.txt"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
4
|
|
2
|
+
data.raw 100
|
|
3
|
+
result-a 90
|
|
4
|
+
result-b 100
|
|
5
|
+
result-c 200
|
|
6
|
+
4
|
|
7
|
+
result-d result-a result-b result-c
|
|
8
|
+
8
|
|
9
|
+
result-a: data.raw
|
|
10
|
+
process $< -o $@
|
|
11
|
+
result-b: data.raw
|
|
12
|
+
process $< -o $@
|
|
13
|
+
result-c: data.raw
|
|
14
|
+
process $< -o $@
|
|
15
|
+
result-d:
|
|
16
|
+
generate result-d
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
4
|
|
2
|
+
seed.dat 100
|
|
3
|
+
output 50
|
|
4
|
+
config 999
|
|
5
|
+
cooked.dat 80
|
|
6
|
+
1
|
|
7
|
+
final
|
|
8
|
+
11
|
|
9
|
+
final: cooked.dat config output stage
|
|
10
|
+
publish $^
|
|
11
|
+
cooked.dat: seed.dat
|
|
12
|
+
cook $< -o $@
|
|
13
|
+
stage: cooked.dat
|
|
14
|
+
output:
|
|
15
|
+
create output
|
|
16
|
+
data:
|
|
17
|
+
fetch data
|
|
18
|
+
unused: config
|
|
19
|
+
skip
|
package/config/medium/SimpleMakefiles/input/07 - Multiple targets with identical prerequisites.txt
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
4
|
|
2
|
+
base.c 50
|
|
3
|
+
extra.c 50
|
|
4
|
+
base.o 100
|
|
5
|
+
extra.o 100
|
|
6
|
+
1
|
|
7
|
+
top
|
|
8
|
+
10
|
|
9
|
+
top:left right
|
|
10
|
+
merge $^
|
|
11
|
+
left: base.o extra.o
|
|
12
|
+
link-left $^
|
|
13
|
+
right: base.o extra.o
|
|
14
|
+
link-right $^
|
|
15
|
+
base.o: base.c
|
|
16
|
+
cc -c $< -o $@
|
|
17
|
+
extra.o: extra.c
|
|
18
|
+
cc -c $< -o $@
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
3
|
|
2
|
+
raw-b 100
|
|
3
|
+
part-a 80
|
|
4
|
+
raw-a 100
|
|
5
|
+
1
|
|
6
|
+
result
|
|
7
|
+
12
|
|
8
|
+
# Build the final product
|
|
9
|
+
result: part-a part-b raw-c
|
|
10
|
+
join $^ > $@
|
|
11
|
+
part-a: raw-a
|
|
12
|
+
echo building part-a
|
|
13
|
+
convert $< $@
|
|
14
|
+
part-b: raw-b
|
|
15
|
+
convert $< $@
|
|
16
|
+
raw-a:
|
|
17
|
+
fetch raw-a # get data
|
|
18
|
+
raw-c:
|
|
19
|
+
fetch raw-c
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
5
|
|
2
|
+
part1.c 100
|
|
3
|
+
part2.c 100
|
|
4
|
+
header.h 100
|
|
5
|
+
part1.o 50
|
|
6
|
+
part2.o 200
|
|
7
|
+
1
|
|
8
|
+
app
|
|
9
|
+
14
|
|
10
|
+
app: lib
|
|
11
|
+
link $^
|
|
12
|
+
lib: part1.o header.h
|
|
13
|
+
stage1 $<
|
|
14
|
+
other: part1.o header.h
|
|
15
|
+
stage1 $<
|
|
16
|
+
lib: part2.o header.h
|
|
17
|
+
stage2 $^
|
|
18
|
+
part1.o: part1.c
|
|
19
|
+
cc -c $< -o $@
|
|
20
|
+
part2.o: part2.c
|
|
21
|
+
cc -c $< -o $@
|
|
22
|
+
other:
|
|
23
|
+
echo "extra target built"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
8
|
|
2
|
+
core.c 100
|
|
3
|
+
math.c 100
|
|
4
|
+
io.c 100
|
|
5
|
+
net.c 100
|
|
6
|
+
core.o 200
|
|
7
|
+
math.o 200
|
|
8
|
+
io.o 90
|
|
9
|
+
net.o 200
|
|
10
|
+
1
|
|
11
|
+
app
|
|
12
|
+
13
|
|
13
|
+
# Partial rebuild test
|
|
14
|
+
app: core.o math.o io.o net.o plugin
|
|
15
|
+
ld $^
|
|
16
|
+
plugin: io.o net.o
|
|
17
|
+
make-plugin $^ -o $@
|
|
18
|
+
core.o: core.c
|
|
19
|
+
cc -c $< -o $@
|
|
20
|
+
math.o: math.c
|
|
21
|
+
cc -c $< -o $@
|
|
22
|
+
io.o: io.c
|
|
23
|
+
cc -c $< -o $@
|
|
24
|
+
net.o: net.c
|
|
25
|
+
cc -c $< -o $@
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
0
|
|
2
|
+
1
|
|
3
|
+
server
|
|
4
|
+
18
|
|
5
|
+
# Cycle detection test
|
|
6
|
+
server: A B
|
|
7
|
+
start $<
|
|
8
|
+
A: B C
|
|
9
|
+
build A
|
|
10
|
+
B: D
|
|
11
|
+
build B
|
|
12
|
+
C: D
|
|
13
|
+
build C
|
|
14
|
+
D:
|
|
15
|
+
build D
|
|
16
|
+
# Unreachable targets that form a cycle
|
|
17
|
+
E: X
|
|
18
|
+
setup E
|
|
19
|
+
X: Y
|
|
20
|
+
build X
|
|
21
|
+
Y: E
|
|
22
|
+
build Y
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
12
|
|
2
|
+
sdk.h 100
|
|
3
|
+
algo.c 300
|
|
4
|
+
parser.c 100
|
|
5
|
+
render.c 100
|
|
6
|
+
logger.c 100
|
|
7
|
+
algo.o 200
|
|
8
|
+
parser.o 150
|
|
9
|
+
render.o 80
|
|
10
|
+
logger.o 200
|
|
11
|
+
libcore.a 170
|
|
12
|
+
librender.a 170
|
|
13
|
+
config.h 90
|
|
14
|
+
1
|
|
15
|
+
app
|
|
16
|
+
24
|
|
17
|
+
# Top-level application build
|
|
18
|
+
app: librender.a libcore.a
|
|
19
|
+
ld $^ -o $@
|
|
20
|
+
# Core library: algo and parser modules
|
|
21
|
+
libcore.a: algo.o parser.o
|
|
22
|
+
ar rcs $@ $^
|
|
23
|
+
libcore.a: logger.o
|
|
24
|
+
ar rcs $@ $^
|
|
25
|
+
# Render library
|
|
26
|
+
librender.a: render.o
|
|
27
|
+
ar rcs $@ $^
|
|
28
|
+
# Compile each module
|
|
29
|
+
algo.o: algo.c sdk.h generate
|
|
30
|
+
cc -c $< -o $@
|
|
31
|
+
parser.o: parser.c sdk.h
|
|
32
|
+
cc -c $< -o $@
|
|
33
|
+
render.o: render.c sdk.h
|
|
34
|
+
cc -c $< -o $@
|
|
35
|
+
logger.o: logger.c
|
|
36
|
+
cc -c $< -o $@
|
|
37
|
+
config.h:
|
|
38
|
+
configure config.h
|
|
39
|
+
generate:
|
|
40
|
+
gen generate
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
2
|
|
2
|
+
src.c 100
|
|
3
|
+
config.ini 200
|
|
4
|
+
1
|
|
5
|
+
release
|
|
6
|
+
19
|
|
7
|
+
# Multi-step build with validation
|
|
8
|
+
release: app docs
|
|
9
|
+
verify $^
|
|
10
|
+
publish $@
|
|
11
|
+
app: config.ini lib.o src.o
|
|
12
|
+
link $^ -o $@
|
|
13
|
+
validate $@
|
|
14
|
+
lib.o: lib.c config.ini
|
|
15
|
+
cc -c $< -o $@
|
|
16
|
+
test $@
|
|
17
|
+
src.o: src.c
|
|
18
|
+
cc -c $< -o $@
|
|
19
|
+
docs:
|
|
20
|
+
generate docs
|
|
21
|
+
index docs
|
|
22
|
+
lib.c:
|
|
23
|
+
fetch
|
|
24
|
+
config.ini:
|
|
25
|
+
init config.ini
|