A Babel of Languages on CodinGame
TBali
60.9K views
C++
As I mentioned in the intro, this playground is still work in progress.
The remaining sections are not ready yet, only some code snippets and tutorial links are provided.
You can still check sample codes where they exist, or jump to the final, Conclusions page using the page selector above.
Volunteers for contributions for any of the missing pages are welcome!
Checking the sample code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
string m;
// getline(cin, m);
m = "CG";
string c[2] = {"00", "0"};
string b;
for (auto & ch: m)
b += bitset<7>(ch).to_string();
string a;
a += c[b[0] - '0'] + " 0";
for (int i = 1; i < b.length(); i++) {
if (b[i] == b[i - 1])
a += "0";
else
a += " " + c[b[i] - '0'] + " 0";
}
// cerr << "Debug messages..." << endl;
cout << a << endl;
}
Looking at the syntax
- TODO
Other characteristics
- TODO
Resources to check
Coming next...
After the C++ section, we can go forward to D :-), or we can go backwards to C. U'll c which 1 I chose...
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Suggested playgrounds