-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinput.cpp
More file actions
44 lines (42 loc) · 872 Bytes
/
Copy pathinput.cpp
File metadata and controls
44 lines (42 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include<bits/stdc++.h>
using namespace std;
vector<vector<int>>matrix;
vector<string>split(string st, char ch){
vector<string>word_list;
string word = "";
for(int i = 0; i < st.length(); i++){
if(st[i] == ch){
if(!word.empty()){
word_list.push_back(word);
}
word = "";
}else{
word+=st[i];
}
}
word_list.push_back(word);
return word_list;
}
int main()
{
/* string s; getline(cin, s);
vector<string>ls = split(s,' ');
for(auto u : ls) cout << u << " " <<endl;
/* for(int i = 0; i < 3; i++){
vector<int>ln;
int x;
for(int j = 0; j < 3; j++){
cin >> x;
ln.push_back(x);
}
matrix.push_back(ln);
}
for(auto u:matrix){
for(auto v: u){
cout << v << " ";
}
cout << "\n";
}
*/
return 0;
}