mirror of
https://gitcode.com/Zengtudor/alg2025.git
synced 2025-08-21 18:52:07 +00:00
优化 sub 函数的 inline 属性并添加 iostream 同步设置
This commit is contained in:
parent
d97fb5c206
commit
2f0f682e93
@ -1,9 +1,11 @@
|
||||
#include <bits/stdc++.h>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
using namespace std;
|
||||
using ll = int64_t;
|
||||
|
||||
vector<ll> sub(vector<int>& nums) {
|
||||
__attribute__((always_inline)) static inline vector<ll> sub(vector<int>& nums) {
|
||||
int n = nums.size();
|
||||
if (n == 0) {
|
||||
return {0};
|
||||
@ -23,6 +25,9 @@ vector<ll> sub(vector<int>& nums) {
|
||||
}
|
||||
|
||||
int main() {
|
||||
iostream::sync_with_stdio(false);
|
||||
cin.tie(nullptr);
|
||||
cout.tie(nullptr);
|
||||
int n, q;
|
||||
scanf("%d %d", &n, &q);
|
||||
vector<int> v(n);
|
||||
|
Loading…
Reference in New Issue
Block a user