跳到正文

cuiyunqi1229

1895369

朝向地表的力,和物体量成正比

这是 2026年11月6日 存档的第 2 版,不是当前版本。查看当前版本

资料、奖项与版本

‌Le comte des sept péchés capitaux‌

Statut : En ligne||être hors ligne

iℏ∂∂tΨ(x,t)=[−ℏ22m∂2∂x2+V(x,t)]Ψ(x,t)i\hbar \frac{\partial}{\partial t} \Psi(x,t) = \left[ -\frac{\hbar^2}{2m} \frac{\partial^2}{\partial x^2} + V(x,t) \right] \Psi(x,t)

Le hollandais volant

飞翔的荷兰人2

hh

hh2

xckd

what-if

mitaka

desmos

AuAu nomnom dede lala Veˊriteˊ,Vérité, parpar l′ardeurl'ardeur dede lala Flamme,Flamme, parpar lala puissancepuissance dudu Tonnerre.Tonnerre.

Je mourrai, mais toi, tu seras éternel.

Sur l’océan qui gronde et déferle sans fin, Le Hollandais Volant trace son sillage sombre, Son navire usé par l’ouragan et l’ombre, Poursuit l’horizon froid que le destin lui teint.
Il porta autrefois, dans son cœur incertain, L’espoir d’atteindre un port, une rive qui l’ombre, Mais la malédiction tissa son fil d’ambre, Et le condamna à errer, loin de tout chemin.
Les voiles sont déchirées par les vents éternels, L’équipage muet, aux visages de sel, Rêve d’un jour de grâce où la mer se calmera.
Phare lointain qui brille, espoir qui se dévoile, Peut-être qu’un soir, l’âme enfin se dévoile, Le Hollandais Volant trouvera son repos là.

怒海奔涌无绝期,
幽灵船痕暗如丝,
风摧影蚀船身老,
冷向命运指处驰。
昔时心有归港愿,
欲寻岸影遮风寒,
诅咒织就琥珀锁,
从此漂泊离尘寰。
长风裂帆岁无尽,
船员面盐默无语,
盼得恩至浪平息。
远灯明,希望生,
终夜魂灵破迷津,
漂泊者,得安身。

瞎写的模拟赛代码:

C++
/*#include<bits/stdc++.h>
using namespace std;
int t;
int main(){
	freopen("xorpath.in","r",stdin);
	freopen("xorpath.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin>>t;
	while(t--){
		long long x,y,max_i=0;
		cin>>x>>y;
		long long ans=x^y;
		cout<<x+y<<" ";
		if(x==0){
			cout<<0<<"\n";
			continue;
		}
		queue<long long>q;
		q.push(x^y);
		while(x>0){
			x--;
			y++;
			q.push(x^y);
		}
		int cs=0;
		while(!q.empty()){
			if(ans<q.front()){
				ans=q.front();
				max_i=cs;
			}
			cs++;
			q.pop();
		}
		cout<<max_i<<"\n";
	}
	return 0;
}*/


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll maxSubmaskLE(ll S, ll x) {
    ll a = 0;
    for (int i = 28; i >= 0; --i) {
        if (!(S & (1LL << i))) continue;
        ll cand = a | (1LL << i);
        if (cand <= x) {
            a = cand;
        }
    }
    return a;
}
int main() {
    freopen("xorpath.in", "r", stdin);
    freopen("xorpath.out", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int t;
    cin >> t;
    while (t--) {
        ll x, y;
        cin >> x >> y;
        ll S = x + y,a = maxSubmaskLE(S, x),xor_val = S,ops=x-a;
        cout<<xor_val<<" "<<ops<<"\n";
    }
    return 0;
}





/*#include<bits/stdc++.h>
using namespace std;
const int MOD=1e9+7;
int n,a[100005][2];
long long ans;
int main(){
	freopen("segmentcraft.in","r",stdin);
	freopen("segmentcraft.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i][1]>>a[i][2];
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(a[i][2]>a[j][1]||a[j][2]>a[i][1])ans+=1;
			else ans+=2;
			ans%=MOD;
		}
	}
	cout<<ans;
	return 0;
}*/


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int P=1e9+7,N=200005;
int n,m,t[N];
ll p[N],ans;
struct S{int l,r;}a[N];
bool operator<(const S&x,const S&y){return x.l<y.l;}
void add(int x){for(;x<=m;x+=x&-x)t[x]++;}
int qry(int x){int s=0;for(;x;x-=x&-x)s+=t[x];return s;}
int main(){
    freopen("segmentcraft.in","r",stdin);
    freopen("segmentcraft.out","w",stdout);
    scanf("%d",&n);
    m=n<<1;
    p[0]=1;
    for(int i=1;i<=n;i++)p[i]=p[i-1]*2%P;
    for(int i=0;i<n;i++)scanf("%d%d",&a[i].l,&a[i].r);
    sort(a,a+n);
    for(int i=0;i<n;i++){
        int k=i-qry(a[i].l-1);
        ans=(ans+p[n-1-k])%P;
        add(a[i].r);
    }
    printf("%lld\n",ans);
    return 0;
}



/*#include<bits/stdc++.h>
using namespace std;
int n,a[1005][3],l;
int main(){
//	freopen("ribbonmix.in","r",stdin);
//	freopen("ribbonmix.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin>>n>>l;
	bool b=true;
	for(int i=1;i<=n;i++){
		cin>>a[i][1]>>a[i][2]>>a[i][3];
	}
	if(n==1&&a[1][1]==l){
		cout<<a[1][2];
		return 0; 
	}
	for(int i=2;i<=n;i++){
		for(int j=2;j<=n;j++){
			if(a[i][3]!=a[j][3]){
				b=false;
			}
		}
	}
	if(b==true){
		cout<<-1;
	}
	return 0;
}*/





#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF=-1e18;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    freopen("ribbonmix.in","r",stdin);
    freopen("ribbonmix.out","w",stdout);
    int n,L;
    cin>>n>>L;
    vector<int>l(n),v(n),raw_c(n);
    for(int i=0;i<n;i++)cin>>l[i]>>v[i]>>raw_c[i];
    vector<int>sc=raw_c;
    sort(sc.begin(),sc.end());
    sc.erase(unique(sc.begin(),sc.end()),sc.end());
    vector<int>c(n);
    for(int i=0;i<n;i++)c[i]=lower_bound(sc.begin(),sc.end(),raw_c[i])-sc.begin();
    vector<ll>mx(L+1,INF),sec(L+1,INF);
    vector<int>mc(L+1,-1);
    mx[0]=0;mc[0]=-1;
    for(int i=0;i<n;i++){
        if(l[i]>L)continue;
        for(int k=L-l[i];k>=0;k--){
            ll prev=INF;
            if(k==0&&mx[0]==0){prev=0;}
            else if(mx[k]!=INF){
                if(mc[k]!=c[i])prev=mx[k];
                else if(sec[k]!=INF)prev=sec[k];
            }
            if(prev==INF)continue;
            int t=k+l[i];
            ll nv=prev+v[i];
            if(mx[t]==INF||nv>mx[t]){
                if(mx[t]!=INF&&mc[t]!=c[i]&&mx[t]>sec[t])sec[t]=mx[t];
                mx[t]=nv;mc[t]=c[i];
            }else if(c[i]!=mc[t]&&nv>sec[t]){
                sec[t]=nv;
            }
        }
    }
    cout<<(mx[L]==INF?-1:mx[L])<<"\n";
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main(){
//	freopen("graphquest.in","r",stdin);
//	freopen("graphquest.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int MAXN = 405,INF = 0x3f3f3f3f;
struct Edge {
    int to, w;
};
int n, m, q;
uint16_t ans_table[MAXN][MAXN][MAXN];
int dist[MAXN];
void solve() {
    cin >> n >> m >> q;
    vector<tuple<int, int, int>> edges(m);
    set<int> wset;
    for (int i = 0; i < m; ++i) {
        int u, v, w;
        cin >> u >> v >> w;
        edges[i] = {u, v, w};
        wset.insert(w);
    }
    vector<int> weights(wset.begin(), wset.end());
    sort(weights.begin(), weights.end());
    int V = weights.size();
    for (int idx = 0; idx < V; ++idx) {
        int thresh = weights[idx];
        vector<vector<Edge>> adj(n + 1);
        for (const auto& [u, v, w] : edges) {
            int cost = (w > thresh) ? 1 : 0;
            adj[u].push_back({v, cost});
            adj[v].push_back({u, cost});
        }
        for (int s = 1; s <= n; ++s) {
            fill(dist, dist + n + 1, INF);
            deque<int> dq;
            dist[s] = 0;
            dq.push_back(s);
            while (!dq.empty()) {
                int u = dq.front();
                dq.pop_front();
                for (const auto& e : adj[u]) {
                    int nd = dist[u] + e.w;
                    if (nd < dist[e.to]) {
                        dist[e.to] = nd;
                        if (e.w == 0) dq.push_front(e.to);
                        else dq.push_back(e.to);
                    }
                }
            }
            for (int t = 1; t <= n; ++t) {
                ans_table[s][t][idx] = (dist[t] < INF) ? (uint16_t)dist[t] : 400;
            }
        }
    }
    bool first = true;
    for (int i = 0; i < q; ++i) {
        int a, b, k;
        cin >> a >> b >> k;
        int need = k - 1;
        int lo = 0, hi = V - 1, res_idx = V - 1;
        while (lo <= hi) {
            int mid = (lo + hi) >> 1;
            if (ans_table[a][b][mid] <= need) {
                res_idx = mid;
                hi = mid - 1;
            } else {
                lo = mid + 1;
            }
        }
        if (!first) cout << ' ';
        cout << weights[res_idx];
        first = false;
    }
    cout << '\n';
}
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    freopen("graphquest.in", "r", stdin);
    freopen("graphquest.out", "w", stdout);
    int t;
    cin >> t;
    while (t--) solve();
    return 0;
}