Saldainių dalybos
- [1] 2022-02-05 10:51 (0)
- [2] 2022-02-05 10:51 (0)
- [3] 2022-02-05 10:52 (0)
- [4] 2022-02-05 10:54 (100)
Taškai: 0
Compile: FAIL
saldainiai.cpp: In function ‘int main()’: saldainiai.cpp:38:33: error: expected ‘}’ before ‘)’ token pairs.push_back({i,sum-i)}; ^ saldainiai.cpp:38:34: error: expected ‘;’ before ‘}’ token pairs.push_back({i,sum-i)}; ^ saldainiai.cpp: At global scope: saldainiai.cpp:41:23: error: ‘pairs’ was not declared in this scope pair<int,int> ans=pairs[0]; ^ saldainiai.cpp:42:14: error: ‘pairs’ was not declared in this scope int best=pairs[0].second-pairs[0].first; ^ saldainiai.cpp:42:30: error: ‘pairs’ was not declared in this scope int best=pairs[0].second-pairs[0].first; ^ saldainiai.cpp:44:5: error: expected unqualified-id before ‘for’ for(int i=1;i<pairs.size();i++){ ^ saldainiai.cpp:44:17: error: ‘i’ does not name a type for(int i=1;i<pairs.size();i++){ ^ saldainiai.cpp:44:32: error: ‘i’ does not name a type for(int i=1;i<pairs.size();i++){ ^ saldainiai.cpp:51:5: error: ‘cout’ does not name a type cout<<ans.first<<" "<<ans.second; ^ saldainiai.cpp:53:5: error: expected unqualified-id before ‘return’ return 0; ^ saldainiai.cpp:54:1: error: expected declaration before ‘}’ token } ^
nr. | result | time | message |
---|