Download uva_cpp_clean/10038/main.cpp from slayone/uva_spoj_raw: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/datasets/slayone/uva_spoj_raw/resolve/main/uva_cpp_clean/10038/main.cpp
- Command line
-
hf download hf://datasets/slayone/uva_spoj_raw/uva_cpp_clean/10038/main.cpp
-
curl -L -o main.cpp https://huggingface.co/datasets/slayone/uva_spoj_raw/resolve/main/uva_cpp_clean/10038/main.cpp
587 Bytes
| using namespace std; | |
| int main(){ | |
| int n, actual, next; | |
| set<int> myset; | |
| while(cin >> n){ | |
| myset.clear(); | |
| cin >> actual; | |
| for(int i=1; i < n; i++){ | |
| cin >> next; | |
| myset.insert(max(actual, next)-min(actual, next)); | |
| // cout << max(actual, next)-min(actual, next) << endl; | |
| actual = next; | |
| } | |
| bool res = true; | |
| for(int i=1; i<n; i++){ | |
| if(myset.find(i) == myset.end()){ | |
| res = false; | |
| break; | |
| } | |
| } | |
| if(res) cout << "Jolly\n"; | |
| else cout << "Not jolly\n"; | |
| } | |
| return 0; | |
| } | |