Translated C++

From Esolang
Jump to navigation Jump to search

Translated C++ is C++ but horribly translated with Microsoft and Baidu. It is designed by PSTF.

1. Take this program

#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <iostream>
using namespace std;
const int maxn = 30;
const int dir[][2] = {-1, -2, 1, -2, -2, -1, 2, -1, -2, 1, 2, 1, -1, 2, 1, 2};
int vis[maxn][maxn];
bool haveAns;
int n, m, t, cas;
void dfs(int x, int y, int cnt, string ans)
{
	if (haveAns) return;
	if (cnt == n * m)
	{
		cout << ans << endl;
		haveAns = true;
		return;
	}
	for (int i = 0; i < 8; i++)
	{
		int tx = x + dir[i][0];
		int ty = y + dir[i][1];
		if (tx > 0 && tx <= n && ty > 0 && ty <= m && !vis[tx][ty])
		{
			vis[tx][ty] = 1;
			char c1 = tx + '0';
			char c2 = ty + 'A' - 1;
			dfs(tx, ty, cnt + 1, ans + c2 + c1);
			vis[tx][ty] = 0;
		}
	}
}

int main()
{
	cas = 1;
	scanf("%d", &t);
	while (t--)
	{
		scanf("%d%d", &n, &m);
		printf("Scenario #%d:\n", cas++);
		haveAns = false;

		memset(vis, 0, sizeof(vis));
		vis[1][1] = 1;
		dfs(1, 1, 1, "A1");

		if (haveAns == false) printf("impossible\n");
		printf("\n");
	}
	return 0;
}

2. Translation

Baidu: English -> Japanese -> Kanuri(Detect as Indonesian) -> Thai -> Simplified Chinese
Microsoft: Simplified Chinese -> English -> Simplified Chinese
Baidu: Simplified Chinese -> Polish -> English

3. 噫吁嚱!怪哉!此鸟乃何物?!

Felnyasansa and Kolgaanan
Shiden Masando Annan
Babusansa Kalmata South
♪ felnnyasanyannan ♪
Your father.
Art, art
constant int maxn=30_;
Goat Bank [2]={-1 za-2 dig1 za-2 za-2 za-2 za-2 za-1 dig2 za-1 za-2 dig2 za-1
Extraction of Nd&wi [colour] [colour]
Paradise Bull
Int n[UNK]m[UNK]t[UNK]Case_
Samudmutab (ending in int y [UNK] int cnt [UNK], string ans_;
{
May (Akandafaka) departure
May (husband=ra=ra obe.maatu)
{
Dear<<<rok<end;
Atsandarfaca=e
Rhubarb acid.
OBE.
There (Sawang Buri=0, bursan8, bur++)
{
Nd RT ben=ben+koz
Nd kur=ks+koz
Maj (Ben and Ben=Pull&Library=Chart&!)
{
Wi [rt ben] [kur]=1 mining
Jerkalc1kal=rt ben+felkal0 debuts
Character c2=ty+'A '-1_;
Umutab (RT Ben ty [UNK] cnt+1 [UNK] ans+c2+c1)
Wi [rt ben] [kur]=0 mining
OBE.
OBE.
OBE.

(Karl.
{
Case=1_
Raqa? Fel% diydeb&ama) mining
Stairs (amaobe)
{
Fel%DIY%DIYDEB(&raᣁ&tu dig)
Ubmnobe#%diy:ra at, "oto++ut
Asandalvka=Ouhakar

Kalwidig0 Digyhapa Kalwi).
Wi [1] [1=1 mining
Udmutab excavator (1,1,1 "A1calma")

May (akandarfaka=nal) reference ("culu")
Cita? # deb extraction error
OBE.
Lu0.
OBE.