mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-10 01:58:48 +00:00
P2069 松鼠吃果子
R52207969
This commit is contained in:
parent
af869f3887
commit
7311709fc9
@ -2,17 +2,16 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
int n, m, k = 1, t;
|
||||
vector<int> listnode;
|
||||
|
||||
int main() {
|
||||
int n, m, k = 1;
|
||||
listnode.clear();
|
||||
cin >> n >> m;
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (int i = 1; i <= n; i++) {
|
||||
listnode.push_back(i);
|
||||
}
|
||||
for (int i = 1; i <= m; i++) {
|
||||
int t = i * i * i % 5 + 1;
|
||||
t = i * i * i % 5 + 1;
|
||||
k += t;
|
||||
if (k > listnode.size()) {
|
||||
k = t + 1;
|
||||
@ -21,6 +20,6 @@ int main() {
|
||||
listnode.erase(listnode.begin() + k - 1);
|
||||
}
|
||||
}
|
||||
cout << listnode[k] << endl;
|
||||
cout << listnode[k - 1] << endl;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user