Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ALEX ENACHE
- #include <vector>
- #include <algorithm>
- #include <queue>
- #include <map>
- #include <set>
- #include <unordered_map>
- #include <time.h>
- #include <iomanip>
- #include <deque>
- #include <math.h>
- #include <cmath>
- #include <assert.h>
- #include <stack>
- #include <bitset>
- #include <random>
- #include <chrono>
- using namespace std;
- //-------------------------------------------------------------------
- #include <iostream>
- //#include <fstream>
- //ifstream cin ("elmaj.in");ofstream cout ("elmaj.out");
- int main() {
- //freopen("input", "r", stdin);freopen("output", "w", stdout);
- int n;
- cin>>n;
- for (int i=1; i<=n; i++){
- string s;
- cin>>s;
- sort (s.begin() , s.end());
- int ok = 0;
- for (int j=1; j<s.size(); j++){
- if (s[j] - s[j-1] != 1){
- cout<<"No"<<'\n';
- ok = 1;
- break;
- }
- }
- if (!ok){
- cout<<"Yes"<<'\n';
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement