| 28 | } |
| 29 | |
| 30 | int main() |
| 31 | { |
| 32 | ofstream fout(getenv("OUTPUT_PATH")); |
| 33 | |
| 34 | string nk_temp; |
| 35 | getline(cin, nk_temp); |
| 36 | |
| 37 | vector<string> nk = split_string(nk_temp); |
| 38 | |
| 39 | int n = stoi(nk[0]); |
| 40 | |
| 41 | int k = stoi(nk[1]); |
| 42 | |
| 43 | string ar_temp_temp; |
| 44 | getline(cin, ar_temp_temp); |
| 45 | |
| 46 | vector<string> ar_temp = split_string(ar_temp_temp); |
| 47 | |
| 48 | vector<int> ar(n); |
| 49 | |
| 50 | for (int i = 0; i < n; i++) { |
| 51 | int ar_item = stoi(ar_temp[i]); |
| 52 | |
| 53 | ar[i] = ar_item; |
| 54 | } |
| 55 | |
| 56 | int result = divisibleSumPairs(n, k, ar); |
| 57 | |
| 58 | fout << result << "\n"; |
| 59 | |
| 60 | fout.close(); |
| 61 | |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | vector<string> split_string(string input_string) { |
| 66 | string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) { |
nothing calls this directly
no test coverage detected