diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-11-05 01:41:11 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-11-05 01:41:11 +0200 |
| commit | 7f856c7ff080b8d455b9ed16c2e57dd862c3879d (patch) | |
| tree | c2baf90f98c91567358003d6b97a4afed7fa9b42 /Dictionary | |
| parent | c52b36c6a37fdb1d1de146d3939cb42e2c691f44 (diff) | |
| download | competitive-programming-7f856c7ff080b8d455b9ed16c2e57dd862c3879d.tar.xz competitive-programming-7f856c7ff080b8d455b9ed16c2e57dd862c3879d.zip | |
moved some file
Diffstat (limited to 'Dictionary')
| -rw-r--r-- | Dictionary/Dictionary.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/Dictionary/Dictionary.cpp b/Dictionary/Dictionary.cpp deleted file mode 100644 index e74018a..0000000 --- a/Dictionary/Dictionary.cpp +++ /dev/null @@ -1,22 +0,0 @@ -#include<bits/stdc++.h> - -using namespace std; - -int solve(char c1, char c2, string letters) { - int c1Pos = letters.find(c1); - letters.erase(remove(letters.begin(), letters.end(), c1), letters.end()); - int c2Pos = letters.find(c2) + 1; - return (c1Pos * 25 + c2Pos); -} - -int main() { - string letters = "abcdefghijklmnopqrstuvwxyz"; - int tt; - cin >> tt; - while (tt--) { - char c1, c2; - cin >> c1 >> c2; - cout << solve(c1, c2, letters) << endl; - } - return 0; -} |
