├── 1703C - Cypher.cpp ├── C - Bun Lover.cpp └── c_math or not /1703C - Cypher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | yildiz 3 | */ 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | using namespace std; 10 | 11 | int main() { 12 | int t; 13 | cin >> t; 14 | while (t--) { 15 | int n; 16 | cin >> n; 17 | vector v(n); 18 | for (int i = 0; i < n; i++) { 19 | cin >> v[i]; 20 | } 21 | 22 | for (int i = 0; i < n; i++) { 23 | int b; 24 | string s; 25 | cin >> b >> s; 26 | for (int j = 0; j < s.length(); j++) { 27 | char m = s[j]; 28 | if (m == 'U') { 29 | v[i] = (v[i] == 0 ? 9 : v[i] - 1); 30 | } 31 | else { 32 | v[i] = (v[i] == 9 ? 0 : v[i] + 1); 33 | } 34 | } 35 | } 36 | for (int x : v) { 37 | cout << x << " "; 38 | } 39 | cout << "\n"; 40 | } 41 | } -------------------------------------------------------------------------------- /C - Bun Lover.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | yildiz 3 | */ 4 | #define ll long long 5 | #define habboosh main 6 | #include 7 | using namespace std; 8 | 9 | int habboosh() { 10 | ll t; cin >> t; 11 | while (t--) { 12 | ll n; 13 | cin >> n; 14 | n++; 15 | cout << (n * n) + 1 << "\n"; 16 | } 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /c_math or not: -------------------------------------------------------------------------------- 1 | /*** وَمَا تَوْفِيقِي إِلَّا بِاللَّهِ ۚ عَلَيْهِ تَوَكَّلْتُ وَإِلَيْهِ أُنِيبُ ***/ 2 | /* Yildiz ☆ */ 3 | using namespace std; 4 | #include 5 | #define habboosh main 6 | #define heba ios::sync_with_stdio(false); cin.tie(nullptr); 7 | #define ss second 8 | #define ll long long 9 | #define loop for (int i=0; i 14 | #include 15 | using namespace __gnu_pbds; 16 | template 17 | using o_set = tree, rb_tree_tag, tree_order_statistics_node_update>;//ordered set 18 | template 19 | using o_mset = tree, rb_tree_tag, tree_order_statistics_node_update>;//ordered multiset 20 | vector> di = {{1,1},{-1,-1},{0,0}}; 21 | const ll mod =2e5 + 7; 22 | const ll inf=2e18+1; 23 | const int N =100+1 ,M=N+4; 24 | vector adj[N]; 25 | int vis[N]; 26 | ll GCD(ll a, ll b) 27 | { 28 | if (b == 0) 29 | return a; 30 | return gcd(b, a % b); 31 | } 32 | ll lcm(ll a, ll b) 33 | { 34 | return (a / gcd(a, b)) * b; 35 | } 36 | ll pow(ll x, ll y) 37 | { 38 | if (y == 0) 39 | return 1; 40 | ll temp = pow(x, y / 2) ; 41 | temp = (temp*temp); 42 | if (y % 2 != 0) 43 | temp = (temp*x); 44 | return temp; 45 | 46 | } 47 | bool isprime(ll x) 48 | { 49 | if(x<2) 50 | return false; 51 | 52 | if(x==2) return true; 53 | if(x%2==0) return false; 54 | for(ll i=3; i<=(ll)sqrt(x); i+=2) if(x%i==0) return false; 55 | 56 | return true; 57 | } 58 | ll power_mod(ll x, ll y,ll m) { 59 | if (y == 0) 60 | return 1; 61 | ll temp = power_mod(x, y / 2, m) ; 62 | temp = (temp*temp)% m; 63 | if (y % 2 != 0) 64 | temp = (temp*x)% m; 65 | return temp; 66 | } 67 | 68 | 69 | 70 | int habboosh() { 71 | heba 72 | ll t; 73 | cin >> t; 74 | while (t--) { 75 | ll n;cin>>n; 76 | ll s= (ll)cbrt(n)+(ll)sqrt(n) - ((ll)sqrt(cbrt(n))); 77 | cout<