Created
December 22, 2025 07:03
-
-
Save Mjkim-Programming/d7ef7a982738f548a4383e95d9a24f4c to your computer and use it in GitHub Desktop.
__in128 template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <bits/stdc++.h> | |
| #define ll long long | |
| #define FASTIO \ | |
| cin.tie(NULL); \ | |
| ios::sync_with_stdio(false); | |
| #define END return 0; | |
| #define out cout << | |
| #define in cin >> | |
| #define i128 __int128 | |
| using namespace std; | |
| ostream& operator<<(ostream& os, i128 x) { | |
| if(x == 0) { | |
| os << '0'; | |
| return os; | |
| } | |
| if(x < 0) { | |
| os << '-'; | |
| x = -x; | |
| } | |
| string s; | |
| while(x > 0) { | |
| s.push_back('0' + x % 10); | |
| x /= 10; | |
| } | |
| reverse(s.begin(), s.end()); | |
| os << s; | |
| return os; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment