QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#73322 | #4439. Link with Equilateral Triangle | LiCooer | AC ✓ | 1ms | 5336kb | C++17 | 1.8kb | 2023-01-23 20:52:48 | 2023-01-23 20:52:49 |
Judging History
answer
//By TOP
#include <iostream>
#include <algorithm>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <set>
#include <list>
#include <unordered_set>
#include <cmath>
#include <bits/stdc++.h>
#include <deque>
#include <vector>
#include <utility>
using namespace std;
#define int long long
typedef pair<int,int> PII;
#define OO 0x3f3f3f3f
#define rd read()
#define mem(a,b) memset(a,b,sizeof a)
#define ios ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define v1 priority_queue<int,vector<int>,greater<int> > v
#define v2 priority_queue<int,vector<int>,less<int> > v
#define debug(a) cout << a << "\n"
const int N = 2000010;
int a[N];
int n;
int tr[N];
/*void build(int u , int l , int r)
{
tr[u] = {l , r};
if(l == r)
{
return ;
}
int mid = l + r >> 1;
build(u << 1 , l , mid);
build(u << 1 | 1 , mid + 1 ,r);
}*/
/*int query(int u , int l , int r)
{
if(tr[u].l >= l && tr[u].r <= r)
{
return tr[u].v;
}
int mid = tr[u].l + tr[u].r >> 1;
int v = 0;
if(l <= mid)
{
v.query(u << 1 , l , r);
}
if(r > mid)
{
v.query(u << 1 | 1 , l , r);
}
return v;
}*/
int lowbit(int x)
{
return x & -x;
}
void add(int x,int c)
{
for(int i = x ; i <= n ; i += lowbit(i) )
{
tr[i] += c;
}
}
int query(int x)
{
int res = 0;
for(int i = x ; i ; i -= lowbit(i))
{
res += tr[i];
}
return res;
}
inline int read()
{
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-') f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - 48;
ch = getchar();
}
return x * f;
}
void solve()
{
cin >> n;
cout << "No" << "\n";
}
signed main()
{
ios;
int t = 1;
cin >> t;
while(t -- )
{
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 5336kb
input:
1000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101...
output:
No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No ...
result:
ok 1000 lines