@cyrilverloop/codingame-configuration 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/CONTRIBUTING.md +6 -2
  3. package/README.md +1 -1
  4. package/config/easy/ABunnyAndCarrots/code/CGCode.js +15 -0
  5. package/config/easy/ABunnyAndCarrots/code/CGCode.php +16 -0
  6. package/config/easy/ABunnyAndCarrots/config.json +28 -0
  7. package/config/easy/ABunnyAndCarrots/input/01 - small garden.txt +3 -0
  8. package/config/easy/ABunnyAndCarrots/input/02 - a bigger garden.txt +3 -0
  9. package/config/easy/ABunnyAndCarrots/input/03 - wide garden.txt +3 -0
  10. package/config/easy/ABunnyAndCarrots/input/04 - so many carrots!!.txt +3 -0
  11. package/config/easy/ABunnyAndCarrots/output/01 - small garden.txt +4 -0
  12. package/config/easy/ABunnyAndCarrots/output/02 - a bigger garden.txt +6 -0
  13. package/config/easy/ABunnyAndCarrots/output/03 - wide garden.txt +6 -0
  14. package/config/easy/ABunnyAndCarrots/output/04 - so many carrots!!.txt +80 -0
  15. package/config/easy/AChildsPlay/code/CGCode.js +12 -0
  16. package/config/easy/AChildsPlay/code/CGCode.php +12 -0
  17. package/config/easy/AChildsPlay/config.json +63 -0
  18. package/config/easy/AChildsPlay/input/01 - test example.txt +8 -0
  19. package/config/easy/AChildsPlay/input/02 - test real case.txt +10 -0
  20. package/config/easy/AChildsPlay/input/03 - test 3.txt +12 -0
  21. package/config/easy/AChildsPlay/input/04 - test 4.txt +12 -0
  22. package/config/easy/AChildsPlay/input/05 - test 5.txt +12 -0
  23. package/config/easy/AChildsPlay/input/06 - test 6.txt +7 -0
  24. package/config/easy/AChildsPlay/input/07 - test 7.txt +6 -0
  25. package/config/easy/AChildsPlay/input/08 - test 8.txt +7 -0
  26. package/config/easy/AChildsPlay/input/09 - test 9.txt +7 -0
  27. package/config/easy/AChildsPlay/input/10 - loop detection 1.txt +8 -0
  28. package/config/easy/AChildsPlay/input/11 - loop detection 2.txt +8 -0
  29. package/config/easy/AChildsPlay/output/01 - test example.txt +1 -0
  30. package/config/easy/AChildsPlay/output/02 - test real case.txt +1 -0
  31. package/config/easy/AChildsPlay/output/03 - test 3.txt +1 -0
  32. package/config/easy/AChildsPlay/output/04 - test 4.txt +1 -0
  33. package/config/easy/AChildsPlay/output/05 - test 5.txt +1 -0
  34. package/config/easy/AChildsPlay/output/06 - test 6.txt +1 -0
  35. package/config/easy/AChildsPlay/output/07 - test 7.txt +1 -0
  36. package/config/easy/AChildsPlay/output/08 - test 8.txt +1 -0
  37. package/config/easy/AChildsPlay/output/09 - test 9.txt +1 -0
  38. package/config/easy/AChildsPlay/output/10 - loop detection 1.txt +1 -0
  39. package/config/easy/AChildsPlay/output/11 - loop detection 2.txt +1 -0
  40. package/config/easy/Defibrillators/code/CGCode.php +4 -4
  41. package/config/easy/HorseRacingDuals/code/CGCode.php +2 -2
  42. package/config/easy/MIMEType/code/CGCode.php +4 -4
  43. package/config/easy/Temperatures/code/CGCode.php +2 -2
  44. package/config/easy/Unary/code/CGCode.php +1 -1
  45. package/config/expert/MusicScores/code/CGCode.php +2 -2
  46. package/config/expert/TheResistance/code/CGCode.php +3 -3
  47. package/config/hard/BlunderEpisode2/code/CGCode.php +2 -2
  48. package/config/hard/BlunderEpisode3/code/CGCode.php +2 -2
  49. package/config/hard/CGXFormatter/code/CGCode.php +2 -2
  50. package/config/hard/GenomeSequencing/code/CGCode.php +2 -2
  51. package/config/hard/RollerCoaster/code/CGCode.php +2 -2
  52. package/config/hard/SuperComputer/code/CGCode.php +2 -2
  53. package/config/hard/TANNetwork/code/CGCode.php +6 -6
  54. package/config/hard/Winamax/code/CGCode.php +2 -2
  55. package/config/medium/BlunderEpisode1/code/CGCode.php +2 -2
  56. package/config/medium/ConwaySequence/code/CGCode.php +2 -2
  57. package/config/medium/DwarfsStandingOnTheShouldersOfGiants/code/CGCode.php +2 -2
  58. package/config/medium/MayanCalculation/code/CGCode.php +7 -7
  59. package/config/medium/NetworkCabling/code/CGCode.php +2 -2
  60. package/config/medium/Scrabble/code/CGCode.php +3 -3
  61. package/config/medium/StockExchangeLosses/code/CGCode.php +2 -2
  62. package/config/medium/TelephoneNumbers/code/CGCode.php +2 -2
  63. package/config/medium/TheGift/code/CGCode.php +3 -3
  64. package/config/medium/War/code/CGCode.php +4 -4
  65. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.1.3] - 2024-05-29
8
+ ### Fixed
9
+ - `STDIN` variables in default PHP codes.
10
+
7
11
  ## [1.1.2] - 2024-05-24
8
12
  ### Fixed
9
13
  - Package version for NPM.
package/CONTRIBUTING.md CHANGED
@@ -44,7 +44,9 @@ The `config.json` file MUST use the following architecture :
44
44
  ```
45
45
 
46
46
  * `path` : MUST be the path to the configuration;
47
- * `name` : MUST be the name of the puzzle from CodinGame;
47
+ * `name` : MUST be the name of the puzzle from CodinGame.
48
+ Single quote `'` MUST be replaced by `‘` for opening and by `’` for closing and apostrophe.
49
+ Double quote `"` MUST be replaced by `«` for opening and by `»` for closing;
48
50
  * `alphanumName` : MUST be the name of the puzzle with only alpha-numeric characters (no space or special character).
49
51
  It MUST be case insensitive and unique amongst all configurations.
50
52
  It MUST start with a letter. The corresponding regex is : `[a-zA-Z]{1}[a-zA-Z0-9]{0,}`;
@@ -52,7 +54,9 @@ It MUST start with a letter. The corresponding regex is : `[a-zA-Z]{1}[a-zA-Z0-9
52
54
  * `tests` : MUST list every tests from CodinGame in the same order.
53
55
 
54
56
  Each test MUST contain :
55
- * `name` : MUST be the name of the test from CodinGame;
57
+ * `name` : MUST be the name of the test from CodinGame.
58
+ Single quote `'` MUST be replaced by `‘` for opening and by `’` for closing and apostrophe.
59
+ Double quote `"` MUST be replaced by `«` for opening and by `»` for closing;
56
60
  * `alphanumName` : MUST be the name of the test with only alpha-numeric characters (no space or special character).
57
61
  It MUST be case insensitive and unique amongst all tests of the current configuration.
58
62
  It MUST start with a letter. The corresponding regex is : `[a-zA-Z]{1}[a-zA-Z0-9]{0,}`;
package/README.md CHANGED
@@ -53,7 +53,7 @@ One file per test;
53
53
  ### JavaScript
54
54
 
55
55
  ```shellsession
56
- npm i @cyril-verloop/codingame-configuration
56
+ npm i @cyrilverloop/codingame-configuration
57
57
  ```
58
58
 
59
59
  ### PHP
@@ -0,0 +1,15 @@
1
+ var inputs = readline().split(' ');
2
+ const M = parseInt(inputs[0]);
3
+ const N = parseInt(inputs[1]);
4
+ const t = parseInt(readline());
5
+ var inputs = readline().split(' ');
6
+ for (let i = 0; i < t; i++) {
7
+ const choices = parseInt(inputs[i]);
8
+ }
9
+ for (let i = 0; i < t; i++) {
10
+
11
+ // Write an answer using console.log()
12
+ // To debug: console.error('Debug messages...');
13
+
14
+ console.log('perimeter');
15
+ }
@@ -0,0 +1,16 @@
1
+ <?php
2
+ fscanf(STDIN, "%d %d", $M, $N);
3
+ fscanf(STDIN, "%d", $t);
4
+ $inputs = explode(" ", fgets(STDIN));
5
+ for ($i = 0; $i < $t; $i++)
6
+ {
7
+ $choices = intval($inputs[$i]);
8
+ }
9
+ for ($i = 0; $i < $t; $i++)
10
+ {
11
+
12
+ // Write an answer using echo(). DON'T FORGET THE TRAILING \n
13
+ // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
14
+
15
+ echo("perimeter\n");
16
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "path": "easy/ABunnyAndCarrots",
3
+ "name": "A Bunny and Carrots",
4
+ "alphanumName": "aBunnyAndCarrots",
5
+ "link": "https://www.codingame.com/ide/puzzle/a-bunny-and-carrots",
6
+ "tests": [
7
+ {
8
+ "name": "Small Garden",
9
+ "alphanumName": "smallGarden",
10
+ "file": "01 - small garden.txt"
11
+ },
12
+ {
13
+ "name": "A Bigger Garden",
14
+ "alphanumName": "aBiggerGarden",
15
+ "file": "02 - a bigger garden.txt"
16
+ },
17
+ {
18
+ "name": "Wide Garden",
19
+ "alphanumName": "wideGarden",
20
+ "file": "03 - wide garden.txt"
21
+ },
22
+ {
23
+ "name": "So Many Carrots!!",
24
+ "alphanumName": "soManyCarrots",
25
+ "file": "04 - so many carrots!!.txt"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,3 @@
1
+ 1 20
2
+ 6
3
+ 2 5 8 13 15 16
@@ -0,0 +1,3 @@
1
+ 20 20
2
+ 80
3
+ 4 14 13 8 14 20 1 19 17 4 14 17 19 2 20 2 12 1 13 19 19 7 5 12 20 4 14 8 10 14 9 19 15 19 8 3 17 17 8 2 17 9 10 16 17 8 16 10 5 20 15 4 3 16 15 6 20 14 20 18 19 11 11 6 8 1 13 17 14 5 8 3 20 12 6 8 3 7 12 13
@@ -0,0 +1,80 @@
1
+ 82
2
+ 84
3
+ 84
4
+ 86
5
+ 88
6
+ 88
7
+ 88
8
+ 88
9
+ 90
10
+ 92
11
+ 94
12
+ 96
13
+ 98
14
+ 98
15
+ 96
16
+ 98
17
+ 98
18
+ 96
19
+ 96
20
+ 98
21
+ 100
22
+ 100
23
+ 100
24
+ 100
25
+ 98
26
+ 100
27
+ 102
28
+ 104
29
+ 106
30
+ 108
31
+ 106
32
+ 108
33
+ 108
34
+ 110
35
+ 112
36
+ 110
37
+ 112
38
+ 114
39
+ 116
40
+ 118
41
+ 120
42
+ 120
43
+ 120
44
+ 118
45
+ 120
46
+ 122
47
+ 122
48
+ 124
49
+ 124
50
+ 122
51
+ 120
52
+ 122
53
+ 120
54
+ 120
55
+ 118
56
+ 116
57
+ 114
58
+ 116
59
+ 114
60
+ 112
61
+ 114
62
+ 112
63
+ 110
64
+ 110
65
+ 112
66
+ 110
67
+ 110
68
+ 112
69
+ 114
70
+ 114
71
+ 116
72
+ 114
73
+ 112
74
+ 112
75
+ 112
76
+ 114
77
+ 114
78
+ 112
79
+ 114
80
+ 112
@@ -0,0 +1,12 @@
1
+ var inputs = readline().split(' ');
2
+ const w = parseInt(inputs[0]);
3
+ const h = parseInt(inputs[1]);
4
+ const n = parseInt(readline());
5
+ for (let i = 0; i < h; i++) {
6
+ const line = readline();
7
+ }
8
+
9
+ // Write an answer using console.log()
10
+ // To debug: console.error('Debug messages...');
11
+
12
+ console.log('answer');
@@ -0,0 +1,12 @@
1
+ <?php
2
+ fscanf(STDIN, "%d %d", $w, $h);
3
+ fscanf(STDIN, "%d", $n);
4
+ for ($i = 0; $i < $h; $i++)
5
+ {
6
+ $line = stream_get_line(STDIN, 500 + 1, "\n");
7
+ }
8
+
9
+ // Write an answer using echo(). DON'T FORGET THE TRAILING \n
10
+ // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
11
+
12
+ echo("answer\n");
@@ -0,0 +1,63 @@
1
+ {
2
+ "path": "easy/AChildsPlay",
3
+ "name": "A child’s play",
4
+ "alphanumName": "aChildsPlay",
5
+ "link": "https://www.codingame.com/ide/puzzle/a-childs-play",
6
+ "tests": [
7
+ {
8
+ "name": "Test example",
9
+ "alphanumName": "testExample",
10
+ "file": "01 - test example.txt"
11
+ },
12
+ {
13
+ "name": "Test real case",
14
+ "alphanumName": "testRealCase",
15
+ "file": "02 - test real case.txt"
16
+ },
17
+ {
18
+ "name": "Test 3",
19
+ "alphanumName": "test3",
20
+ "file": "03 - test 3.txt"
21
+ },
22
+ {
23
+ "name": "Test 4",
24
+ "alphanumName": "test4",
25
+ "file": "04 - test 4.txt"
26
+ },
27
+ {
28
+ "name": "Test 5",
29
+ "alphanumName": "test5",
30
+ "file": "05 - test 5.txt"
31
+ },
32
+ {
33
+ "name": "Test 6",
34
+ "alphanumName": "test6",
35
+ "file": "06 - test 6.txt"
36
+ },
37
+ {
38
+ "name": "Test 7",
39
+ "alphanumName": "test7",
40
+ "file": "07 - test 7.txt"
41
+ },
42
+ {
43
+ "name": "Test 8",
44
+ "alphanumName": "test8",
45
+ "file": "08 - test 8.txt"
46
+ },
47
+ {
48
+ "name": "Test 9",
49
+ "alphanumName": "test9",
50
+ "file": "09 - test 9.txt"
51
+ },
52
+ {
53
+ "name": "Loop detection 1",
54
+ "alphanumName": "loopDetection1",
55
+ "file": "10 - loop detection 1.txt"
56
+ },
57
+ {
58
+ "name": "Loop detection 2",
59
+ "alphanumName": "loopDetection2",
60
+ "file": "11 - loop detection 2.txt"
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,8 @@
1
+ 12 6
2
+ 987
3
+ ...#........
4
+ ...........#
5
+ ............
6
+ ............
7
+ ..#O........
8
+ ..........#.
@@ -0,0 +1,10 @@
1
+ 12 8
2
+ 1234321
3
+ ....#.......
4
+ ........#...
5
+ ...........#
6
+ ...#O.......
7
+ ...#........
8
+ .......#....
9
+ ...........#
10
+ ....#.......
@@ -0,0 +1,12 @@
1
+ 14 10
2
+ 123456789
3
+ ..#...........
4
+ ....#..#......
5
+ .#O.....#.....
6
+ ..............
7
+ ..............
8
+ .......##...#.
9
+ ............#.
10
+ .#........###.
11
+ .#.#..........
12
+ ..............
@@ -0,0 +1,12 @@
1
+ 16 10
2
+ 12321123212397
3
+ ...#...###......
4
+ ...............#
5
+ .#..............
6
+ ...........#....
7
+ ................
8
+ ................
9
+ ..#O............
10
+ .......####.....
11
+ #...............
12
+ ###############.
@@ -0,0 +1,12 @@
1
+ 20 10
2
+ 1234567898765434
3
+ ...#.......#........
4
+ .......#..........#.
5
+ ..#O........#.......
6
+ ......#.............
7
+ ....................
8
+ ........#......#....
9
+ ....................
10
+ ..#......#..........
11
+ ..............#.....
12
+ ..................#.
@@ -0,0 +1,7 @@
1
+ 6 5
2
+ 15
3
+ ######
4
+ ##...#
5
+ #.O#.#
6
+ #....#
7
+ ######
@@ -0,0 +1,6 @@
1
+ 4 4
2
+ 2
3
+ ####
4
+ #..#
5
+ #O.#
6
+ ####
@@ -0,0 +1,7 @@
1
+ 5 5
2
+ 13
3
+ #####
4
+ #...#
5
+ #.#.#
6
+ #...#
7
+ #O###
@@ -0,0 +1,7 @@
1
+ 5 5
2
+ 4
3
+ #####
4
+ #...#
5
+ #.#.#
6
+ #...#
7
+ ##O##
@@ -0,0 +1,8 @@
1
+ 12 6
2
+ 4000000000
3
+ ..##..#.....
4
+ ...........#
5
+ ............
6
+ ............
7
+ .#.O........
8
+ ..........#.
@@ -0,0 +1,8 @@
1
+ 12 6
2
+ 4000000000
3
+ ..##..#.....
4
+ ...........#
5
+ ......O.....
6
+ ............
7
+ .#..........
8
+ ..........#.
@@ -1,9 +1,9 @@
1
1
  <?php
2
- fscanf($stdin, "%s", $LON);
3
- fscanf($stdin, "%s", $LAT);
4
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%s", $LON);
3
+ fscanf(STDIN, "%s", $LAT);
4
+ fscanf(STDIN, "%d", $N);
5
5
  for ($i = 0; $i < $N; $i++) {
6
- $DEFIB = stream_get_line($stdin, 256 + 1, "\n");
6
+ $DEFIB = stream_get_line(STDIN, 256 + 1, "\n");
7
7
  }
8
8
 
9
9
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,7 +1,7 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++) {
4
- fscanf($stdin, "%d", $pi);
4
+ fscanf(STDIN, "%d", $pi);
5
5
  }
6
6
 
7
7
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,15 +1,15 @@
1
1
  <?php
2
2
  // $N: Number of elements which make up the association table.
3
- fscanf($stdin, "%d", $N);
3
+ fscanf(STDIN, "%d", $N);
4
4
  // $Q: Number Q of file names to be analyzed.
5
- fscanf($stdin, "%d", $Q);
5
+ fscanf(STDIN, "%d", $Q);
6
6
  for ($i = 0; $i < $N; $i++) {
7
7
  // $EXT: file extension
8
8
  // $MT: MIME type.
9
- fscanf($stdin, "%s %s", $EXT, $MT);
9
+ fscanf(STDIN, "%s %s", $EXT, $MT);
10
10
  }
11
11
  for ($i = 0; $i < $Q; $i++) {
12
- $FNAME = stream_get_line($stdin, 256 + 1, "\n");// One file name per line.
12
+ $FNAME = stream_get_line(STDIN, 256 + 1, "\n");// One file name per line.
13
13
  }
14
14
 
15
15
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,7 +1,7 @@
1
1
  <?php
2
2
  // $n: the number of temperatures to analyse
3
- fscanf($stdin, "%d", $n);
4
- $inputs = explode(" ", fgets($stdin));
3
+ fscanf(STDIN, "%d", $n);
4
+ $inputs = explode(" ", fgets(STDIN));
5
5
  for ($i = 0; $i < $n; $i++) {
6
6
  $t = intval($inputs[$i]); // a temperature expressed as an integer ranging from -273 to 5526
7
7
  }
@@ -1,5 +1,5 @@
1
1
  <?php
2
- $MESSAGE = stream_get_line($stdin, 100 + 1, "\n");
2
+ $MESSAGE = stream_get_line(STDIN, 100 + 1, "\n");
3
3
 
4
4
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
5
5
  // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
@@ -1,6 +1,6 @@
1
1
  <?php
2
- fscanf($stdin, "%d %d", $W, $H);
3
- $IMAGE = stream_get_line($stdin, 256 + 1, "\n");
2
+ fscanf(STDIN, "%d %d", $W, $H);
3
+ $IMAGE = stream_get_line(STDIN, 256 + 1, "\n");
4
4
 
5
5
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
6
6
  // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
@@ -1,9 +1,9 @@
1
1
  <?php
2
- fscanf($stdin, "%s", $L);
3
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%s", $L);
3
+ fscanf(STDIN, "%d", $N);
4
4
  for ($i = 0; $i < $N; $i++)
5
5
  {
6
- fscanf($stdin, "%s", $W);
6
+ fscanf(STDIN, "%s", $W);
7
7
  }
8
8
 
9
9
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- $room = stream_get_line($stdin, 256 + 1, "\n");
5
+ $room = stream_get_line(STDIN, 256 + 1, "\n");
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- fscanf($stdin, "%d %d", $num, $t);
5
+ fscanf(STDIN, "%d %d", $num, $t);
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- $cgxLine = stream_get_line($stdin, 1000 + 1, "\n");
5
+ $cgxLine = stream_get_line(STDIN, 1000 + 1, "\n");
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- fscanf($stdin, "%s", $subseq);
5
+ fscanf(STDIN, "%s", $subseq);
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d %d %d", $L, $C, $N);
2
+ fscanf(STDIN, "%d %d %d", $L, $C, $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- fscanf($stdin, "%d", $pi);
5
+ fscanf(STDIN, "%d", $pi);
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- fscanf($stdin, "%d %d", $J, $D);
5
+ fscanf(STDIN, "%d %d", $J, $D);
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,15 +1,15 @@
1
1
  <?php
2
- fscanf($stdin, "%s", $startPoint);
3
- fscanf($stdin, "%s", $endPoint);
4
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%s", $startPoint);
3
+ fscanf(STDIN, "%s", $endPoint);
4
+ fscanf(STDIN, "%d", $N);
5
5
  for ($i = 0; $i < $N; $i++)
6
6
  {
7
- $stopName = stream_get_line($stdin, 256 + 1, "\n");
7
+ $stopName = stream_get_line(STDIN, 256 + 1, "\n");
8
8
  }
9
- fscanf($stdin, "%d", $M);
9
+ fscanf(STDIN, "%d", $M);
10
10
  for ($i = 0; $i < $M; $i++)
11
11
  {
12
- $route = stream_get_line($stdin, 256 + 1, "\n");
12
+ $route = stream_get_line(STDIN, 256 + 1, "\n");
13
13
  }
14
14
 
15
15
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,6 +1,6 @@
1
1
  <?php
2
- fscanf($stdin, "%d %d", $width, $height);
2
+ fscanf(STDIN, "%d %d", $width, $height);
3
3
  for ($i = 0; $i < $height; $i++)
4
4
  {
5
- fscanf($stdin, "%s", $row);
5
+ fscanf(STDIN, "%s", $row);
6
6
  }
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d %d", $L, $C);
2
+ fscanf(STDIN, "%d %d", $L, $C);
3
3
  for ($i = 0; $i < $L; $i++)
4
4
  {
5
- $row = stream_get_line($stdin, 101 + 1, "\n");
5
+ $row = stream_get_line(STDIN, 101 + 1, "\n");
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,6 +1,6 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $R);
3
- fscanf($stdin, "%d", $L);
2
+ fscanf(STDIN, "%d", $R);
3
+ fscanf(STDIN, "%d", $L);
4
4
 
5
5
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
6
6
  // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
@@ -1,10 +1,10 @@
1
1
  <?php
2
2
  // $n: the number of relationships of influence
3
- fscanf($stdin, "%d", $n);
3
+ fscanf(STDIN, "%d", $n);
4
4
  for ($i = 0; $i < $n; $i++)
5
5
  {
6
6
  // $x: a relationship of influence between two people (x influences y)
7
- fscanf($stdin, "%d %d", $x, $y);
7
+ fscanf(STDIN, "%d %d", $x, $y);
8
8
  }
9
9
 
10
10
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,17 +1,17 @@
1
1
  <?php
2
- fscanf($stdin, "%d %d", $L, $H);
2
+ fscanf(STDIN, "%d %d", $L, $H);
3
3
  for ($i = 0; $i < $H; $i++) {
4
- fscanf($stdin, "%s", $numeral);
4
+ fscanf(STDIN, "%s", $numeral);
5
5
  }
6
- fscanf($stdin, "%d", $S1);
6
+ fscanf(STDIN, "%d", $S1);
7
7
  for ($i = 0; $i < $S1; $i++) {
8
- fscanf($stdin, "%s", $num1Line);
8
+ fscanf(STDIN, "%s", $num1Line);
9
9
  }
10
- fscanf($stdin, "%d", $S2);
10
+ fscanf(STDIN, "%d", $S2);
11
11
  for ($i = 0; $i < $S2; $i++) {
12
- fscanf($stdin, "%s", $num2Line);
12
+ fscanf(STDIN, "%s", $num2Line);
13
13
  }
14
- fscanf($stdin, "%s", $operation);
14
+ fscanf(STDIN, "%s", $operation);
15
15
 
16
16
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
17
17
  // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- fscanf($stdin, "%d %d", $X, $Y);
5
+ fscanf(STDIN, "%d %d", $X, $Y);
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,10 +1,10 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- $W = stream_get_line($stdin, 30 + 1, "\n");
5
+ $W = stream_get_line(STDIN, 30 + 1, "\n");
6
6
  }
7
- $LETTERS = stream_get_line($stdin, 7 + 1, "\n");
7
+ $LETTERS = stream_get_line(STDIN, 7 + 1, "\n");
8
8
 
9
9
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
10
10
  // To debug: error_log(var_export($var, true)); (equivalent to var_dump)
@@ -1,6 +1,6 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $n);
3
- $inputs = explode(" ", fgets($stdin));
2
+ fscanf(STDIN, "%d", $n);
3
+ $inputs = explode(" ", fgets(STDIN));
4
4
  for ($i = 0; $i < $n; $i++)
5
5
  {
6
6
  $v = intval($inputs[$i]);
@@ -1,8 +1,8 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
2
+ fscanf(STDIN, "%d", $N);
3
3
  for ($i = 0; $i < $N; $i++)
4
4
  {
5
- fscanf($stdin, "%s", $telephone);
5
+ fscanf(STDIN, "%s", $telephone);
6
6
  }
7
7
 
8
8
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,9 +1,9 @@
1
1
  <?php
2
- fscanf($stdin, "%d", $N);
3
- fscanf($stdin, "%d", $C);
2
+ fscanf(STDIN, "%d", $N);
3
+ fscanf(STDIN, "%d", $C);
4
4
  for ($i = 0; $i < $N; $i++)
5
5
  {
6
- fscanf($stdin, "%d", $B);
6
+ fscanf(STDIN, "%d", $B);
7
7
  }
8
8
 
9
9
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
@@ -1,17 +1,17 @@
1
1
  <?php
2
2
  // $n: the number of cards for player 1
3
- fscanf($stdin, "%d", $n);
3
+ fscanf(STDIN, "%d", $n);
4
4
  for ($i = 0; $i < $n; $i++)
5
5
  {
6
6
  // $cardp1: the n cards of player 1
7
- fscanf($stdin, "%s", $cardp1);
7
+ fscanf(STDIN, "%s", $cardp1);
8
8
  }
9
9
  // $m: the number of cards for player 2
10
- fscanf($stdin, "%d", $m);
10
+ fscanf(STDIN, "%d", $m);
11
11
  for ($i = 0; $i < $m; $i++)
12
12
  {
13
13
  // $cardp2: the m cards of player 2
14
- fscanf($stdin, "%s", $cardp2);
14
+ fscanf(STDIN, "%s", $cardp2);
15
15
  }
16
16
 
17
17
  // Write an answer using echo(). DON'T FORGET THE TRAILING \n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyrilverloop/codingame-configuration",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A project that contains CodinGame input, output and default code.",
5
5
  "repository": {
6
6
  "type": "git",