QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#414205#4250. Marszeta75320 7ms4004kbC++171.4kb2024-05-18 17:17:272024-05-18 17:17:28

Judging History

你现在查看的是最新测评结果

  • [2024-05-18 17:17:28]
  • 评测
  • 测评结果:0
  • 用时:7ms
  • 内存:4004kb
  • [2024-05-18 17:17:27]
  • 提交

answer

#include "mars.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define rep(i,n) for(ll i=0;i<n;i++)
#define all(x) x.begin(),x.end()

struct unionfind{
    unionfind() {}
    vector<ll> par,sz;
    unionfind(ll N):par(N),sz(N){
        rep(i,N) par[i]=i,sz[i]=1;
    }
    ll root(ll x){
        if(par[x]==x) return x;
        ll t=root(par[x]);
        par[x]=t;
        return t;
    }
    void unite(ll x,ll y){
        ll rx=root(x);
        ll ry=root(y);
        if(rx==ry) return;
        if(sz[rx]>sz[ry]) swap(rx,ry);
        par[rx]=ry;
        sz[ry]+=sz[rx];
    }
    bool same(ll x,ll y){
        ll rx=root(x);
        ll ry=root(y);
        return rx==ry;
    }
    ll size(ll x){
        return sz[x];
    }
};

std::string process(std::vector <std::vector<std::string>> a, int i, int j, int k, int n)
{
	unionfind tree(9);
	rep(i,3){
		rep(j,3){
			if(i<3-1){
				if(a[i][j][0]=='1'&&a[i+1][j][0]=='1'){
					tree.unite(i*3+j,(i+1)*3+j);
				}
			}
			if(j<3-1){
				if(a[i][j][0]=='1'&&a[i][j+1][0]=='1'){
					tree.unite(i*3+j,i*3+(j+1));
				}
			}
		}
	}
	set<ll> s;
	rep(i,3){
		rep(j,3){
			if(a[i][j][0]=='1'){
				s.insert(tree.root(i*3+j));
			}
		}
	}
	ll ans=s.size();
	string ANS(100,'0');
	rep(i,10){
		if(ans&(1<<i)) ANS[i]='1';
	}
	return ANS;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 7ms
memory: 4004kb

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
2
934 389 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
f18fba32-f6de-4dd0-ef1b-ea027937a4aa
100000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
5
934 390 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
935 389 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
9
933 391 626 424
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
3
935 391 626 427
1010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
5
935 391 626 427
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 1101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
4
935 391 626 427
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 1110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

input:

224bb858-b13b-5e97-cbba-4a10b0455e79
5
935 390 626 424
0010111000011100001101110100011101000000010110011011101010001010000001011000010011000001111011111111 0101011000101100110110100011110010000010000100001010001110101111010000100001110000001110110011001010 0110111001011000110000110000011011100110001...

output:

f18fba32-f6de-4dd0-ef1b-ea027937a4aa
0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000...

result:

wrong answer 1st numbers differ - expected: '1', found: '0'

Subtask #2:

score: 0
Skipped

Subtask #3:

score: 0
Skipped

Subtask #4:

score: 0
Skipped

Subtask #5:

score: 0
Skipped

Subtask #6:

score: 0
Skipped

Subtask #7:

score: 0
Skipped

Subtask #8:

score: 0
Skipped

Subtask #9:

score: 0
Skipped

Subtask #10:

score: 0
Skipped