Vision Transformer with Deformable Attention
on Review
on Review
on Projects
```cpp #define _CRT_SECURE_NO_WARNINGS #include
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<stack>
using namespace std;
int k;
int num;
long long int sum;
stack<int> num_list;
int main() {
cin >> k;
for (int i = 0; i < k; i++) {
cin >> num;
num_list.push(num);
if (num == 0) {
num_list.pop();
num_list.pop();
}
}
sum = 0;
while(num_list.empty()==false) {
sum = sum + num_list.top();
num_list.pop();
}
cout << sum;
}
```cpp #define _CRT_SECURE_NO_WARNINGS #include