Compare commits

..

No commits in common. "c0d1a2f156d35e47c184db7700a3972a941a6261" and "0cea6a732cc40bbf273094dd0522ffbe44d60615" have entirely different histories.

3 changed files with 3 additions and 81 deletions

3
src/8/12/P8866.cpp Normal file
View File

@ -0,0 +1,3 @@
int main(){
}

View File

@ -1,42 +0,0 @@
#include <cstdint>
#include <iostream>
using ll = int64_t;
ll T,n,m,k,kp;
int main(){
std::ios_base::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cin>>T;
while(T--){
std::cin>>n>>m>>k;
bool isn2n=false;
ll n2n=0;
for(ll i=1;i<=m;i++){
std::cin>>kp;
nxt:;
if(isn2n && kp!=2*n-1){
if((n2n&1)==0){
for(ll j=1;j<=n2n;j++){
std::cout<<1<<" "<<n<<"\n";
goto nxt;
}
}else{
if((kp&1)==0){
for(ll j=1;j<=n2n;j++){
std::cout<<1<<" "<<((kp+1)>>2)<<"\n";
}
}
}
isn2n=false;
n2n=0;
}else if(kp==2*n-1){
n2n++;
isn2n=true;
}
}
}
}

View File

@ -1,39 +0,0 @@
#include <cstdint>
#include <cstdio>
#include <iostream>
#include <istream>
using ll = int64_t;
const ll maxn = 750+5;
ll n;
bool b[maxn][maxn],z[maxn][maxn];
char tmp;
ll ans;
int main(){
std::iostream::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cin>>n;
for(ll i=1;i<n;i++){
for(ll j=i+1;j<=n;j++){
std::cin>>tmp;
b[i][j]=tmp-'0';
}
}
for(ll i=1;i<n;i++){
ans+=b[i][i+1];
z[i][i+1]=b[i][i+1];
}
for(ll i=1;i<=n-2;i++){
for(ll j=i+2;j<=n;j++){
bool zn=false;
for(ll k=i+1;k<j;k++){
zn^=z[i][k];
z[i][j]=zn^z[k][j];
ans+=z[i][j];
}
}
}
std::cout<<ans<<"\n";
}