Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define FAST_IO() do { \
- ios_base::sync_with_stdio(false); \
- cin.tie(NULL); \
- cout.tie(NULL); \
- } while (0);
- #define start_routine() int begtime = clock();
- #define end_routine() do { \
- int endtime = clock(); \
- cerr << "\n\n" << "Time elapsed: " \
- << (endtime - begtime) * 1000 / CLOCKS_PER_SEC \
- << " ms\n\n"; \
- } while (0);
- #define ll long long int
- #define ull unsigned long long int
- #define db long double
- #define ff first
- #define ss second
- #define MP make_pair
- #define pb push_back
- #define lb lower_bound
- #define ub upper_bound
- #define pii pair<int, int>
- #define pdd pair<db, db>
- #define pll pair<ll, ll>
- #define vpl vector<pll>
- #define vll vector<ll>
- #define mod 1000000007
- #define mod1 998244353
- #define inf 1000000000000000007
- #define eps 0.000001
- #define stp fixed << setprecision(20)
- #define endl '\n'
- #define codejam 0
- #define APNA_IO
- #define TYPE int
- #define RET int
- std::vector<TYPE> to_vector(std::string);
- std::string from_vector(std::vector<RET>);
- std::vector<RET> solve(vector<TYPE> ques, int val) {
- return ques;
- }
- int main() {
- FAST_IO();
- #ifdef APNA_IO
- start_routine();
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- ll t;
- cin >> t;
- for (ll i = 1; i <= t; ++i) {
- string s;
- int val;
- cin >> s >> val;
- vector<TYPE> ques = to_vector(s);
- if (codejam)
- cout<<"Case #"<<i<<": ";
- cout << from_vector(solve(ques, val)) << endl;
- }
- #ifdef APNA_IO
- end_routine();
- #endif
- return 0;
- }
- std::vector<TYPE> to_vector(std::string str) {
- std::vector<TYPE> out;
- std::string i;
- std::istringstream tokenStream(str);
- while (std::getline(tokenStream, i, ','))
- out.push_back(atoi(i.c_str()));
- return out;
- }
- std::string from_vector(std::vector<RET> arr) {
- std::string out = "";
- for (int i= 0 ; i < arr.size(); ++i) {
- out += std::to_string(arr[i]);
- if (i != arr.size() - 1)
- out += ",";
- }
- return out;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement