From 353dcafbc8a893a9d523949396b628875b2da7ad Mon Sep 17 00:00:00 2001 From: Muhammad Faishol Amirul Mukminin Date: Mon, 8 Oct 2018 17:35:42 +0700 Subject: [PATCH] Delete L13-1.cpp --- L13-1.cpp | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 L13-1.cpp diff --git a/L13-1.cpp b/L13-1.cpp deleted file mode 100644 index 4cbef6c..0000000 --- a/L13-1.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include -using namespace std; - -typedef long long ll; -typedef pair pl; - -#define PUB push_back -#define fi first -#define se second - -int N, ans = 0; -string S, fin = ""; -char trans[4][4] = {{'A', 'B', 'C', 'D'}, - {'B', 'A', 'D', 'C'}, - {'C', 'D', 'A', 'B'}, - {'D', 'C', 'B', 'A'}}; - -string ubah(string &a, int thn){ - string ret = a; - - for(int i=0;i> S; - N = S.length(); - for(int i=0;i=0;i--){ - string now = ubah(S, (1 << i)); - if(now != fin){ - if(i == 21){ - cout << -1 << endl; - return 0; - } - - ans += (1 << i); - S = now; - } - } - - if(S == fin) cout << 0 << endl; - else cout << ans + 1 << endl; -}